CompTIA Linux+ (XK0-006)System ManagementEasy
A junior administrator is troubleshooting a Linux server and needs to know where system-wide log files such as syslog and boot messages are stored according to the Filesystem Hierarchy Standard (FHS). Which directory should they check?
- A/proc/log
- B/var/log
- C/usr/log
- D/etc/log
Show answer & explanationAnswer & explanation
Correct answer: B. /var/log
The FHS defines /var/log as the standard location for variable log data, including system, kernel, and application logs. The other paths are not valid FHS log locations.
Why the other options are wrong
- A. /proc is a virtual filesystem for kernel/process info, not log storage.
- C. /usr holds shareable, read-only program data, not logs.
- D. /etc holds configuration files, not logs.
FHS /var Directory
/var holds variable data that changes during system operation, such as logs, spool files, and caches.
- /var/log stores system and application logs
- /var/spool holds print and mail queues
- /var/cache stores application cache data
Memory trick: VAR = 'Various Altering Records' — data that keeps changing lives here