cd

cd Cheatsheet #

The cd command is used to change the current working directory in Unix-like operating systems.

Basic Commands #

Command/OptionExampleDescription
cd /path/to/directorycd /home/user/documentsChange to the specified directory
cd ~cd ~Change to the home directory of the current user
cd -cd -Change to the previous directory
cd ..cd ..Move up one directory level
cdcdChange to the home directory (same as cd ~)

Special Directory Shortcuts #

Command/OptionExampleDescription
cd /cd /Change to the root directory
cd .cd .Stay in the current directory (no change)
cd ../..cd ../..Move up two directory levels

This cheatsheet provides essential cd commands for navigating the file system.

cd

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.