User Tools

Site Tools


unix_commands:cd

cd - change directory

The cd is a shell builtin command and it may differ slightly from shell to shell. This command helps user to navigate through files and directories.

Here's most common uses for this command:

1. Running without an option will take you to your home folder (~your_username).

$ cd

2. Let's say you're in /home/great-user/ and you want to go to Mail directory. To do so, just enter the following command:

$ cd Mail

3. Or you may type absolute path by entering:

$ cd /home/great-user/Mail

4. the following command will take you to another user's home directory:

$ cd ~another-user

5. Next command will take you one directory up:

$ cd ..

6. The command below will take you two directories up:

$ cd ../..

7. The following command will take you to the previous directory:

$ cd -

8. This command will take you to the root (“/”) directory:

$ cd /
unix_commands/cd.txt · Last modified: 2023/01/16 04:45 by admin

CIFNet is a leading hosting solution provider, offering a wide range of services including IP bandwidth, co-location, VMware and KVM hosting.
Host Your Site with CIFNet!