There's a saying in the Linux world that "everything is a file" (a comment attributed to Ken Thompson, the developer of UNIX). That includes directories. Directories are just files with lists of files inside them. All these files and directories are organized into a hierarchical file system, starting from the root directory and branching out. Note
The root directory (referred to as slash, or /) is aptly named. If you consider your file system as a tree's root system spreading out below the surface, you start to get an idea of just what things look like. Under the root directory, you'll find folders called usr, bin, etc, tmp, and so on. Let's open Nautilus and have a look at this structure. Click Places on your top panel and select Home Folder. This brings up the file browser in your home folder. If your navigation panel isn't up (Nautilus' left side panel), press <F9> to open it. You'll see a number of entries, including your home directory. On the left, Nautilus shows a small list of important places on your system, primarily in your home folder. This side panel is the navigation panel. Pressing <F9> hides (or brings forward) the navigation panel. Beside the Places label, there is an arrow, alerting you to the fact that this is actually a button with a drop-down list of options. Click that button now and select Tree for your view. In all likelihood, you'll see two entries: one for Home Folder and another for File System. To the left of each entry is a small arrow. Click the one beside File System (or double-click the folder) to get a top-down view of your Ubuntu Linux system (see Figure 4-1). Figure 4-1. Nautilus, the GNOME file browser, with a top-down view of the Ubuntu Linux file system. This view is selected from the navigation panel on the left.On the right, the contents of the current place (or location) are displayed. If this is a directory (like your home directory), the various directories will appear as folder icons. These are all system directories, and they will contain all the programs that make your Linux system run, including documentation, devices, and device drivers. For the most part, you aren't going to be touching the files under File System. Accidentally changing things around in this part of your system probably isn't a good thing (it could render your system inoperative), which is why everyone logs in with their own accounts. Tip
One of the directories under the root is called home and inside that directory, you'll discover other directories, one for each login name on your system. These are the individual home directories, and it is where you'll find your personal files and directories. If you want to store personal documents, music files, or pictures, this is the place. Once you are in Nautilus, you can jump to your home directory by clicking the Home icon or clicking Go on the menu bar and selecting Home (keyboard jockeys can just press <Alt+Home>). This is your $HOME. Quick Tip
Try this. Over on the left side of the Tree view, click the small arrow beside the home directory. As you saw earlier, the Tree view expands to show the folders in your own personal directory. Notice that the right-pointing arrow is now a down-pointing arrow. If you click it again, the directory view collapses. With the home directory expanded, click your personal directory. You should see a few items appear in the right-side view, including one icon labeled Desktop. For an example, see Figure 4-2. On the left side, the home folder is expanded, and the right-side view shows the same folder collapsed. Figure 4-2. Expanding and collapsing folders in Nautilus' Tree view.
Before you do anything else, I want you to reopen Nautilus in your home folder (click Places and select Home Folder). There's a very special folder there called Desktop. Now, look down in your bottom panel, over on the far left side of the screen. Do you see the Desktop icon there? It looks like an old-fashioned desktop blotter with a pencil and a piece of paper on it. Pause your mouse cursor over it, and the tooltip displays Click Here to Hide All Windows and Show the Desktop. Click it, and your desktop appears, free of windows. Click it again, and everything returns to normal. Now, I'm going to briefly jump ahead in the book and have you create a folder on your desktop. Right-click anywhere on that empty desktop and a pop-up menu appears. The top entry in that menu is Create Folder. Click that and a folder appears on your desktop with the label Untitled Folder beneath it (see Figure 4-3). Type in a name and press <Enter>. Figure 4-3. To create a folder on the desktop, right-click and select New Folder. Then, change the name of the untitled folder.
I am having you do this because I want you to remember something later when I have you create icons on your desktop. The desktop you are looking at when you work with your Ubuntu system is that Desktop folder in your home directory. If you create a folder on the desktop, use Nautilus to view your home folder, and then double-click the Desktop folder, you will see your newly created folder in the Desktop folder. The same is true for image files or songs or video clips. If it's on your desktop, it's in the Desktop folder. Even those icons on your desktop are files or directories. Cool? Let's move on. Shell Out
Directories (and subdirectories) usually show up as folders, although this isn't a hard and fast rule because you can customize this. Nevertheless, some directories have different icons right from the startthe Desktop icon you just visited being one of them. |