Getting Around the Linux Directory Structure with the cd Command

53

Today is very much a “back to the basics” kind of day. In this article I am going to cover one of the most basic commands in Linux; the cd command. While today’s article might be basic; it is always good even for experienced sysadmins, to look back at some of the basics and see if there are ways to improve your command line skills and Linux knowledge.

The Linux/Unix directory structure

Before getting into how to change to another directory, let’s take a minute to cover how Linux’s directory structure is laid out. Linux’s directory structure is a hierarchical directory structure, what this means is that there is a top-level or root directory and there are multiple levels of directories within the root directory. Most common Linux & Unix file systems support directories existing within other directories allowing for quite an extensive multi-level directory structure.

In Linux/Unix the root directory is symbolized by a / character. Any directories within the root directory can be targeted by putting / in front of the directories name, if we were to target the etc directory we could do so by referencing /etc. In addition to symbolizing the root directory the / character is also used to separate directories when referencing absolute paths. To continue with our etc example if we wanted to target the network directory inside of etc we could do so by referencing /etc/network.

 

Originally Posted on BenCane.com: Go To Article

 
Read more at bc-log