Linux Training Online – Using the Linux CD Command to Change Directory – Linux System Administration

As a new user looking for Linux training, you need to learn how to use commands. And one of the most commonly used file system commands is the CD (change directory) command.

Using the Linux CD Command

The CD (change directory) command is used to change from your current directory (folder) into a different directory.

You need to change into a directory to do Linux administration tasks like:

  • create a new file or remove an existing file
  • copy or move a file to a different directory
  • edit and modify a file, such as a text configuration file for a Linux server
  • create a new directory or remove an existing directory
  • copy or move a directory to a different directory

Linux Commands Training Tips: The System Administration commands, examples and concepts covered here apply to ALL Linux distributions, including: Red Hat, Fedora, Ubuntu, Edubuntu, Kubuntu, Slackware, Debian, SUSE and openSUSE.

Linux CD Command Example – Changing into a Directory Below the Current Directory

To change directory into a directory “below” the current one, you type in CD and a space and the name of the directory you want to change into.

For example, to change into a directory named “letters”, you run the following:

$ CD letters

To change into a different directory, just replace “letters” with a different name.

Linux Training Tips: A directory inside the current one is considered “below” the current directory, and is called a sub directory.

Linux CD Command Example – Changing Up One Directory (Level)

To change directory up one directory (level), you type in CD and a space and then two dots (periods).

For example, if you have moved into the directory named “letters” and want to go back (up) to your previous directory, you run the following:

$ CD ..

Linux Training Tips: The directory above the current one is also called the “parent”.

Beyond This “Linux Training Online” ArticleThe Linux CD command is used in many other ways to navigate around the file system.

To continue your Linux training, you also need to learn how to use the CD command to: change to the root directory, change using an absolute path, and also easily change into a directory parallel to the current directory.

You can clearly and easily see all of the concepts and commands shown above (and lots more!) by watching a Linux training video.

With this method of Linux training, you can see how to use a command step-by-step and also hear how to run the command. This is a very easy way to learn how to use Linux.