Chapter 14. Explaining the Linux filesystem hierarchy

 

We’ve spent some time exploring different Linux commands, working within your home directory (I’ll explain home in just one moment). But there are other directories on your system containing information related to everything from your program files to your system’s configuration files. In this chapter, we’re going to explore those directories, learning what’s in them and what you can do with them. While this process is helpful in troubleshooting issues with your systems, I want to emphasize that it’s just as important for personalizing your system. So knowing and understanding these directories isn’t only about fixing what’s broken. It’s also about improving what already works.

Before we begin, I want to note that Linux directories are different from Windows directories, in that they don’t use letters to identify hard drives or partitions. So while your Windows installation lives on a C: drive, Linux (and OS X) simply use directory names, like /home.

You might think you know your home directory pretty well, based upon the amount of time we’ve spent in it, but there are some interesting secrets hidden within Linux directories. Let’s take a deeper look at home.

14.1. /home

The /home directory on Linux systems is the user’s personal directory. As you’ve seen over the past few chapters, your /home directory has your personal folders:

  • Desktop
  • Downloads
  • Music
  • Public
  • Videos
  • Documents
  • Pictures
  • Templates

14.2. / (root)

14.3. /usr, /bin, and /sbin

14.4. /etc

14.5. /tmp

14.6. Wrapping up

14.7. Lab