What is the 'cd' command?

QuestionsQuestions8 SkillsProYour First Linux LabAug, 21 2025
0214

The cd command stands for "change directory." It is used in the command line interface to navigate between different directories in the file system.

Basic Usage:

  • To change to a specific directory, you can use:
    cd /path/to/directory

Examples:

  1. Change to a specific directory:

    cd /home/user/Documents
  2. Move up one level to the parent directory:

    cd ..
  3. Return to your home directory:

    cd ~
  4. Switch to the previous directory you were in:

    cd -

The cd command is a shell builtin command, meaning it is part of the shell itself rather than an external program.

0 Comments

no data
Be the first to share your comment!