Touring the Linux Filesystem

In this section, I take a look at the contents of the typical Linux filesystem. Being at least a bit familiar with it helps you track things down later, and will help you to know where it’s safe to mess with things and where you need to be very careful.

The root of the tree

Everything in the Linux filesystem is relative to the root directory — not to be confused with the system Administrator, who is the root user — which is referred to as /. This is the file-system base — a doorway into all your files. The root directory contains a mostly predictable set of subdirectories. Each distribution varies slightly, but certain standards exist to which they all conform. The standards keep the Linux world somewhat sane.

If you’re interested in these standards, go to www.pathname.com/fhs and look at the latest version of the rules.

Table 7-1 lists what you might find in the base directories, meaning the items you find in /. (This list can vary depending on what you installed.) An asterisk (*) at the end of a description indicates that you shouldn’t mess with this directory unless you have a really good reason because it contains files that are very important to the functioning of your system. Really, most of the base directories should be left alone. It’s sections inside them that are safe to change.

Table 7-1. Standard / Contents in Linux
DirectoryContains
/bin ...

Get Linux® For Dummies®, 8th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.