Linux Administration 5 lessons
  1. 1 The filesystem and where things live
  2. 2 Users, permissions and sudo sign in to open
  3. 3 Services, processes and logs sign in to open
  4. 4 Networking and the firewall sign in to open
  5. 5 Keeping a server alive sign in to open
Course overview
Data: video · change

This lesson: 122KB

Linux Administration · Lesson 1 of 5

The filesystem and where things live

Know where to look before you need to.

Linux puts things in predictable places, and knowing them turns most problems into a short search.

Configuration lives in /etc. Web server settings, SSH settings, cron jobs, the list of users. When something is configured wrongly, this is where it is configured.

Variable data lives in /var. Logs in /var/log, web content often in /var/www, mail and spool files. When a disk fills up, /var is nearly always the reason, and usually a log file nobody rotated.

Programs live in /usr/bin and /usr/local/bin, the second being for things you installed yourself rather than through the package manager.

Home directories in /home, except root, which has /root.

Temporary files in /tmp, cleared on reboot, which is a property people forget when they leave something important there.

The process and system views, /proc and /sys, are not real files. They are the kernel exposing its state as if they were, which is how tools read memory and CPU information.

Two ideas underneath everything. Almost everything is a file, including devices and, through /proc, running processes. And configuration is plain text, which means you can read it, copy it, put it in version control and diff it against a working server.

Before you change any configuration file, copy it with the date in the name. When the service will not start at eleven at night, that copy is how you get back to a working state in ten seconds.

Lab — try it yourself

Find which directory is using the most space on a machine you have access to. If it is /var/log, find out which file and why.

Check what you learned

Create your free BvLogic ID to take the quiz and record your score.

Create your BvLogic ID
Continue to lesson 2 Up next 2. Users, permissions and sudo