Directory Flashcards

(24 cards)

1
Q

What are the main 4 directories in Linux?

A

/bin /boot /dev and /etc

in short “bbde”

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

Contents of /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
3
Q

Contents of /boot

A

Contains the Linux kernel, initial RAM disk image (for drivers needed
at boot time), and the boot loader. Interesting files include /boot/
grub/grub.conf, or menu.lst, which is used to configure the boot
loader, and /boot/vmlinuz (or something similar), the Linux kernel.

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

Contents of /dev

A

This is a special directory that 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.

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

Contents of /etc

A

The /etc directory contains all the system-wide configuration files. It
also contains a collection of shell scripts that start each of the system
services at boot time. Everything in this directory should be readable
text. While everything in /etc is interesting, here are some all-time
favorites: /etc/crontab, a file that defines when automated jobs will
run; /etc/fstab, a table of storage devices and their associated mount
points; and /etc/passwd, a list of the user accounts.

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

Contents of /home

A

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

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

Contents of /lib

A

Contains shared library files used by the core system programs.
These are similar to dynamic link libraries (DLLs) in Windows.

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

Contents of /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 file system corruption event. Unless something really bad
has happened to your system, this directory will remain empty.

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

Contents of /media

A

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

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

Contents of /mnt

A

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

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

Contents of /opt

A

The /opt directory is used to install “optional” software. This is mainly
used to hold commercial software products that might be installed on
the system.

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

Contents of /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

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

Contents of /root

A

This is the home directory for the root account

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

Contents of /sbin

A

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

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

Contents of /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.

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

Contents of /usr

A

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

17
Q

Contents of /usr/bin

A

/usr/bin contains the executable programs installed by your Linux
distribution. It is not uncommon for this directory to hold thousands of
programs.

18
Q

Contents of /usr/lib

A

The shared libraries for the programs in /usr/bin.

19
Q

Contents of /usr/local

A

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

20
Q

Contents of /usr/sbin

A

Contains more system administration programs.

21
Q

Contents of /usr/share

A

/usr/share contains all the shared data used by programs in /usr/bin.
This includes things such as default configuration files, icons, screen
backgrounds, sound files, and so on.

22
Q

Contents of /usr/share/doc

A

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

23
Q

Contents of /var

A

With the exception of /tmp and /home, the directories we have
looked at so far remain relatively 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, and so forth, are
located here.

24
Q

Contents of /var/log

A

/var/log contains log files, records of various system activity. These
are important and should be monitored from time to time. The most
useful ones are /var/log/messages and /var/log/syslog. Note that
for security reasons on some systems, you must be the superuser to
view log files.