To change directories at the Linux command line.
Linux cd command summary with examples (3:39)
Videos can also be accessed from the YouTube Playlist.
Our eighth word, or command to memorize is
cd from the category Navigation.
cd allows you to change
the current directory. In our last two videos we used
pwd to print the working directory,
ls to list files, now it's time
for a command to explore Linux directories.
It may help to think of commands as mini programs and most follow this
command -option(s) argument(s).
cd command has only
3 options and the interesting stuff is in the
arguments, so we'll spend more time in the terminal.
Before that, note, there are absolute and relative references.
Absolute means you use
cd to change
directories from the root, and relative means you change directories
from where you sit.
So why is
cd an important command?
cd is the main command for
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows 10.
Here we go, start with
pwd to find
out where you are currently.
Next, let's try an absolute reference. Type
cd /bin and try the
ls from video 7 and see if any files
Now, to use
cd for relative path
changes just know that one dot
means the current directory and two dots
.. means one directory above. So if
cd .. and
cd .., where does that take you?
To the root.
And last, because we only have time to scratch the surface with
cd here, in the description below
please find a link to the
Sheet, that supplements this
series. There you will find a description of about 20 standard
directories on most Linux distributions. As homework, please use this
to navigate around.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
If you can't find a tidy help manual for
cd, which is common, we'll help you
in our next video.
Okay, thanks for visiting today. I hope this was a fun introduction
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Subscribe to be notified about new opportunities to learn.
cdcommand, hit Back.
cdand move on to tutorial #9 on
bash, click Next.