Linux and Command-Line Basics

Which of the following correctly pairs standard Linux directories with what is placed in them?

  1. A/etc: configuration files of the system and services; /var/log: log files; /usr/bin: executables of the commands users run
  2. B/etc: executables of the commands users run; /var/log: log files; /usr/bin: configuration files of the system and services
  3. 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.
Practice this topic Back to topic

Books on Linux and Command-Line Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Linux and Command-Line Basics questions

  1. Which of the following correctly describes the /proc directory on Linux?
  2. The directory /home/alice/data exists, and the current directory is /home/alice/work. Which of the following is the directory shown when "cd ../data" is run and then "pwd"?
  3. In the home directory, "ls" shows only notes.txt, while "ls -a" shows ".", "..", ".bashrc" and "notes.txt". Which of the following correctly explains this result?
  4. When the commands above are run in order, which of the following is the result of the last two cat commands?
  5. A directory contains six files: a1.txt, a2.txt, a10.txt, b1.txt, c1.txt and a1.csv. Which of the following is the number of files shown when "ls [ab]?.txt" is run in this directory?