More About Directories!

So in the last post we talked about moving up and down in directories, and that there’s such a thing as levels in the directories. Today we’ll talk about some more commands useful for directories and y et more terms used.

The first thing to talk about is, well, where are you at any time? What’s your current directory? This is actually called the current working directory and you can find out what your current wo rking directory is by doing the command pwd.

Alpha:~ computerlamp$ pwd

/home/computerlamp

When you first start your terminal session, you’re in your home directory. This has a special symbol of ~. That means when you do:

Alpha:~ computerlamp$ cd ~

You’ll go to your home directory. To make things easier, you don’t even have to use the ~ to go to your home directory. The command:

Alpha:~ computerlamp$ cd

Will take you there. So let’s change gears slightly and talk about that prompt:

Alpha:~ computerlamp$

The first word Alpha is the name of the computer. Mine is named Alpha for Alpha 5 from the Power Rangers.  The ~ in the prompt refers to the directory you’re in. In this case, we’re in the home directory.  After the ~ is a space and then your username. My username is computerlamp.

Now let’s talk about the string we saw before when we typed pwd. We saw: /home/computerlamp The / is the directory separator. The first one means the root directory, or the very top directory that’s possible on the system. The home is the subdirectory of the root and it’s the directory where all home directories are kept. And the computerlamp is my home directory. So my home directory has two names, ~ and /home/computerlamp 

Leave a Reply

Your email address will not be published. Required fields are marked *