Our next command is
cd, which stands for “change directory.” Just as you would click on a folder in Windows Explorer or Finder,
cd switches you into the directory you specify. In other words,
cd changes the working directory.
Let’s say the directory we change into is 2015:
$ cd 2015
When a file, directory, or program is passed into a command, it is called an argument. Here the 2015 directory is an argument for the
cd command takes a directory name as an argument and switches into that directory.
Our current working directory is /home/ccuser/workspace/blog. Transfer into the 2015 directory.
You should now be in /home/ccuser/workspace/blog/2015 (remember that you can see your working directory at any time using
pwd). List the contents of your current directory.
Let’s move further into the filesystem. We are currently in the 2015 directory, and we know that it contains a directory named jan. jan itself contains a directory named memory. (You can reference the filesystem for this lesson here.)
Move into jan and then into memory.
Print the working directory again to see the new location.