Exploring The System Flashcards

2
Q

How do you list the content of a directroy?

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you determine a file type?

A

file filename

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you veiw the contents of a file?

A

less

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do we change the format of a commands output?

A

We change the format of a command output by using Options and Arguments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do list the content of multiple directories?

A

ls ~ /usr /var Issue a ls to tell the system to list the content of each directory listed seperated by a space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does ls -a (–all) do?

A

List all files, even those that begin with a period, which are normally hidden

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does ls - l do?

A

Displays results in long form

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does ls - d (–directory) do?

A

When used in conjunction with -l it will list the details of the direcotry rather than its contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does ls -h (human-readable) do?

A

In long form listing, displays the file size in human readable format rather than bytes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does ls -F (–classify) do?

A

This option appends an indicator character to the end of each listed name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does ls -r (–reverse) do?

A

Displays results in reverse order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does ls -s do?

A

Sorts by file size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does ls -t do?

A

Sorts by modification time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a common ls command with options

A

ls -ltr This will show the contents of a directory in long format sorted by time then display in reverse order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are some of the common ways to navigate less

A

“Page up or b Scroll back one page”
“Page Down or space Scroll forward one page”
“Up Arrow” Scroll up one line”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How can we view the contents of a text file?

A

less

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

/

A

The root directory. Where everything begins.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

/bin

A

Contains binaries (programs) that must be present for the system to boot and run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

/boot

A

Contains the Linux kernel, initial RAM disk image (for drivers needed at boot time), and the boot loader.

21
Q

/boot/grub/grub.conf or menu.lst

A

used to configure the boot loader

22
Q

/boot/vmlinuz

A

the linux kernel

23
Q

/etc

A

The /etc directory contains all of the system-wide configuration files. It also contains a collection of shell scripts which start each of the system services at boot time. Everything in the directory should be readable text.

24
Q

/etc/crontab

A

A file that defines when automated jobs will run

25
Q

/dev

A

This is a special directory which contains device nodes. “Everything is a file” also applies to devices. Here is where the kernel maintains a list of all the devices it understands.

26
Q

/etc/fstab

A

a table of storage devices and their associated mount points

27
Q

/etc/passwd

A

a list of the user accounts

28
Q

/lib

A

Contains shared library files used by the core system programs. These are similar to DLLs in Windows.

29
Q

/home

A

In normal configurations, each user is given a directory in /home. Ordinary users can only write files in the home directories. This limitation protects the system from errant user activity.

30
Q

/lost+found

A

Each formatted partition or device using a Linux file system such as ext3, will have this directory. It is used in the case of a partial recovery from a system corruption event. Unless something really bad has happened to your system this directory will remain empty.

31
Q

/media

A

On modern Linux systems the /media directory will contain the mount points for removable media such as USB drives CD-ROMs, etc. that are mounted automatically at insertion.

32
Q

/opt

A

The /opt direcotry is used to install “optional” software. This is mainly used to hold commercial software products that may be installed on your system.

33
Q

/proc

A

The /proc directory is special. It’s not a real file system in the sense of files stored on your hard drive. Rather, it is a virtual file system maintained by the Linux Kernel. The “files” it contains are peepholes into the kernel itself. The files are readable and will give you a picture of how the kernel sees your computer.

34
Q

/mnt

A

On older Linux systems, the /mnt directory contains mount points for removable devices that have been removed manually.

35
Q

/root

A

This is the home directory for the root account

36
Q

/sbin

A

This directory contains “system” binaries. These are programs that perform vital system task that are generally reserved for the superuser.

37
Q

/tmp

A

The /tmp directory is intended for the storage of temporary, transient files created by various programs. Some configurations cause this directory to be emptied each time the system is rebooted.

38
Q

/usr

A

The /usr directory tree is likely the largest one on a Linux system. It contains al the programs and support files used by regular users.

39
Q

/usr/bin

A

/usr/bin contains the executalbe programs installed by you linux distrobution. It is not uncommon for this directory to hold thousands of programs.

40
Q

/usr/lib

A

The shared libraries for the programs in /usr/bin

41
Q

/usr/sbin

A

Contains more system administration programs

42
Q

/usr/local

A

The /usr/local tree is where programs that are not included with your distorbution but are intended for system wide use are installed. Programs compied from source code are normally installed in /usr/local/bin . On a newly installed Linux system, this tree exists, but will be empty until the system administrator puts something in it.

43
Q

/usr/share

A

/usr/share contains all the shared data used by the programs in /usr/bin. This includes things like default configuration files, icons, screen backgrounds, sound files, etc.

44
Q

/usr/share/doc

A

Most packaged installed on the system will include some kind of documentation. In /usr/share/doc, we will find documentation files organized by package.

45
Q

/var

A

With the exception of /tmp and /home, the directories we have looked at so far remain releatively static, that is, their contents don’t change. The /var directory tree is where data that is likely to change is stored. Various databases, spool files, user mail, etc. are located here.

46
Q

/var/log

A

/var/log contains log files, records of various system activity. These are very important and should be monitore from time to time. The most useful one is the /var/log/messages. Note that for security reason on some systems, you must be supersuser to veiw log files.