Thursday, May 10, 2007

Linux Training Online - Using the Linux cd Command to Change Directory in the Linux File System

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

Using the Linux cd Command

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

You need to change into a directory with the cd command 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 Linux 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 cd Command Example - Changing into a Directory Below the Current Directory

To change directory into a directory "below" the current directory, 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" below the current directory, you run the following command.

]$ cd letters

To change into a different directory, below the current directory, just replace "letters" with the name of the directory.

Linux Tips: A directory inside the current directory is considered "below" the current directory, and is called a subdirectory.

Linux cd Command Example - Changing Directory 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 command.

]$ cd ..

Linux Tips: The directory above the current directory is also called the "parent" directory.

Beyond This "Linux Training Online" Article

The Linux cd command is used in many other ways to navigate around the Linux 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 directory 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 Linux concepts and commands shown above (and lots more!) by watching a Linux video tutorial.

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

Labels: , , , , ,

2 Comments:

Blogger Unknown said...

This article has been stolen from my web site!

Please remove it immediately!

Google and other major search engines have been notified.

ClydeBoom@iLearnLinux.com

July 5, 2007 at 8:46 AM  
Blogger Unknown said...

To get all Linux Training articles, go to http://www.iLearnLinux.com and click on the link at the top of the page.

Please remove this article (and any others you have stolen) immediately.

ClydeBoom@iLearnLinux.com

July 5, 2007 at 8:49 AM  

Post a Comment

<< Home