📜  cd in linux - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:59:53.971000             🧑  作者: Mango

cd in Linux Shell-Bash

cd stands for "change directory" and is used in Linux or Unix-based operating systems to move between directories in the command line interface (CLI).

Syntax
cd [directory]

directory is the path to the new directory to change to.

Examples

Changing to a directory in the current directory:

cd directory_name

Changing to a directory using absolute path:

cd /path/to/directory

Changing to parent directory:

cd ..

Changing to home directory:

cd ~
Tips
  • Tab completion can be used to quickly complete the name of a directory or file while typing it out.
  • Using cd - will take you to the previous directory.
Conclusion

cd is a powerful command in Linux or Unix-based operating systems that allows you to quickly navigate your file system in the command line interface. Knowing how to use it effectively can save you time and make your work more efficient.