Linux Root Directories Flashcards
(19 cards)
What does /bin contain?
Essential command binaries that need to be available in single-user mode, including to bring up the system or repair it, for all users (e.g., cat, ls, cp).
What is single user mode?
The concept is broader than just linux but what I am interested in here is the idea that we are booting into a mode with a single root user and minimal tooling. Think of it as a recovery mode.
What does /boot contain?
Boot loader files. Things like kernels and intird (initial ramdisk).
What does /etc contain?
System wide configuration files. e.g. hosts
What does /home contain?
User files and user specific configuration files
What does /dev contain?
Device files
What is a device file?
An interface to a device driver. They allow applications to interact with a device by using its device driver via standard input/output calls.
What does /lib contain?
The /lib directory contains those shared library images needed to boot the system and run the commands in the root filesystem, ie. by binaries in /bin and /sbin.
What does /media contain?
Subdirectories which are used as mount points for removable media. E.g. Floppy disks
What does /mnt contain?
Temporarily mounted file systems. This can be things like network storage for example.
What does /opt contain?
This is where optional software packages are placed. This is fairly rarely used these days.
What does /root contain?
This is the home directory for the root user. This is optional.
What does /proc contain?
This contains files representing process and system information.
What does /run contain?
Run time variable information. This is data that describes the system since it was booted. Files in this area mush be cleared at the beginning of a boot sequence.
What does /sbin contain?
System binaries. To contrast this with user. System binaries are commands only for system administration.
What does /srv contain?
Sometimes this gets used for serving files. Sometimes this is done with a directory for each protocol. E.g. ftp, rsync, … This is most often though isn’t used and will be blank.
What does /tmp contain?
Made available for programs that require a place to store temporary files. There should be no assumption that files are preserved here between invocations.
What is /usr?
usr is Unix System Resources. Its the place where most programs reside. There is a another area This is where programs not essential for single user mode reside.
What is in /var?
System specific variable files. This includes things like logs, spool directories, and some temporary files. It tends to also be where web servers put their files.