How to use 'cd' command?

The cd (change directory) command is used to navigate between directories in the file system. Here are some common usages:

  1. Change to a specific directory:

    cd /path/to/directory
  2. Change to the home directory:

    cd ~
  3. Change to the parent directory:

    cd ..
  4. Change to the previous directory:

    cd -
  5. Change to a directory using a relative path:
    If you are in /home/user and want to go to /home/user/documents, you can simply use:

    cd documents

After using the cd command, you can use pwd to verify your current directory.

0 Comments

no data
Be the first to share your comment!