IT 1100 : Introduction to Operating Systems
Directory Tree Structure
Linux, OSX and Windows all have different directory tree structures. Even different versions of Linux have unique directory structures.
This is an example of an Ubuntu Linux directory structure. You should gain a basic understanding of the types of files stored in each of these directories.
More detailed information is contained in WES-3.
Although the exact file and directory names will differ between Operating Systems and Distributions, the way that you navigate through them is generally the same - Directories(Folders) and Files. Directories can be inside of other directories. You can go in and out of directories, down and up the tree.
Since we are using the command line instead of the mouse - spelling is important. You must type everything exact.
- Note the path differences - Windows uses backslashes C:\\Users\smorgan\ and Linux uses forward slashes /home/smorgan/.
- When accessing directories the final slash is optional
- Files will never end in a slash
- Capitalization matters. Linux is case sensitive.
- Spaces matter. To access a file or directory with a space in the name put the entire path in quotes.
As you navigate through the Linux directory tree and run the
ls command you will notice the different colors of the names. Although each terminal is slightly different. These are some File Type Colors:
- purple / blue - directory
- green - programs
- white / black - file
- light blue - symbolic links (shortcuts)
- pink - graphic image
- red - archive
- yellow and black - device
- green background - sticky - only the owner of the file (and root) can delete a file in the directory
Everything you type on the command line will have the same basic structure. As you learn each new command watch closely for this structure. It will help you remember the correct syntax for your commands.
command -options arguments
Arguments are simply the
directory(ies) or file(s) that we want to run the command on.
Options are our preferences as to how the command runs.
Some commands have options and some have arguments. Sometimes options and arguments are required and sometimes they are optional. Sometimes both, sometimes none. It all depends on the command itself.
However, everything always begins with a command.
And there is always a space between the command and the options and the arguments.
Read and Complete the Excercises in the Book
Last Updated 12/15/2017