Skip to main content
Logo image

Section 14.5 Making and Using Directories

Subsection 14.5.1 The Home Directory

The ~ (tilde) symbol is a quick way (sort of a short-hand) for specifying your home directory. Every user has a home directory and each user’s home directory is their own (not accessible to others).
On the engs20 servers, you are the user Your NetID, and your home directory is:
/thayerfs/home/Your_NetID
Thus, the ~ stands for that exact path on the engs20 servers. Try it out: type cd ~ and then ls to verify that you are indeed back in your home directory.

Subsection 14.5.2 Print the Working Directory

Got lost in your filesystem? Type pwd to print the working directory (that is the directory that you are currently in).
You can also look at your prompt in terminal to find out where you are. Or you could simply type cd with nothing after it, and you will be brought to your home directory. Or cd ~ as we just learned.

Subsection 14.5.3 Make a New Directory

The command mkdir creates a new directory, and it will only work in a directory for which you have write permission.

Activity 14.6.

Change into your workspace directory by typing cd or cd ~ to change into your home directory, then cd engs20, followed by cd workspace to be brought into the workspace directory.
Now, type mkdir LA1 to create a directory for Long Assignment 1. Note: Linux is case sensitive! So la1 is totally different from LA1.
Type ls to verify that you have created a new directory named LA1 in your workspace directory. Verify that you see the directory in your file browser as well.