Linux and Command-Line Basics
Which of the following correctly pairs standard Linux directories with what is placed in them?
- A/etc: configuration files of the system and services; /var/log: log files; /usr/bin: executables of the commands users run
- B/etc: executables of the commands users run; /var/log: log files; /usr/bin: configuration files of the system and services
- C/etc: configuration files of the system and services; /var/log: log files; /usr/bin: each user's personal files
Show answer and explanation
Answer: A. /etc: configuration files of the system and services; /var/log: log files; /usr/bin: executables of the commands users run
The directory layout of Linux broadly follows a convention called the FHS (Filesystem Hierarchy Standard). /etc holds configuration files of the system and services, /var/log holds log files, and /usr/bin holds the executables of commands users run, such as ls and grep. Each user's personal files live in that user's home directory under /home. Temporary files that may be lost at a reboot go in /tmp.
- A. Correct. Configuration is in /etc, logs in /var/log and commands in /usr/bin.
- B. The roles of /etc and /usr/bin are swapped. Command executables are in /usr/bin and configuration files in /etc.
- C. Each user's personal files are kept in the home directories under /home.