Originally Published: Wednesday, 14 June 2000 Author: Tom Dominico, Jr.
Published to: learn_articles_firststep/General Page: 1/1 - [Std View]

The Linux Directory Structure

So, you've taken the plunge and installed Linux. Congratulations! You've taken the first step on a long but very rewarding journey, and we're here to help. If you've come from a Windows or Macintosh background, you're going to be faced with some potentially unfamiliar concepts that are essential to using the system effectively. Let's get started by talking about a very important concept: the Linux directory structure.

So, you've taken the plunge and installed Linux. Congratulations! You've taken the first step on a long but very rewarding journey, and we're here to help. If you've come from a Windows or Macintosh background, you're going to be faced with some potentially unfamiliar concepts that are essential to using the system effectively. Let's get started by talking about a very important concept: the Linux directory structure.

If you've come from, say, a Windows background, you're used to certain types of files being in certain locations. Linux is no different in this respect, except that the locations are different. You may find the Linux way of doing things more preferable, simply because files are arranged in a more logical hierarchy.

The first thing to note is that in a directory path, directory and file names are separated by forward slashes ("/") instead of backslashes. In Linux, directories are arranged in a tree-like structure, starting with what is known as the "root," or top-most directory. The root directory is represented by a single forward slash. Underneath it are the main system directories. To display the contents of the root directory, we can use the "ls" (list) command, specifying the root directory:

tom@murdock:~$ ls /

The output of that command will include the following directories:

bin boot dev etc home lib mnt proc root sbin tmp usr var

Now, let's talk about the significance of these items.

Well, this concludes our tour of the Linux directory structure. Consider it your "roadmap" for moving around on the system. Hopefully, it will assist you in finding your way around more easily. In the future, we'll discuss basic commands for working with files and directories. In the meantime, if you have ideas for an article you'd like to see on the FirstStep section, send an email to tomd@linux.com.

Tom Dominico (tomd@linux.com) is a programmer, database administrator, and Linux convert. Cursed with insomnia, he spends his sleepless nights chatting on IRC, tweaking his Linux box, and reading everything he can get his hands on.