A Quick Introduction to Unix/Changing Directories

From Wikibooks, open books for an open world
Jump to: navigation, search

Changing to different directories[edit]

cd (change directory)[edit]

The command cd somedirectory means change the current working directory to somedirectory. The current working directory is the directory that you are currently working in and you can check where it is with pwd. Having changed directory and checked where you are you can also of course list its contents with ls.

Type the following series checking after each one with the command pwd to find out where you are:

% cd mytraining
% mkdir archive
% cd ~

Reflect for a moment and see if you can explain what you just did.