-
How to change current directory in Linux (cd)linux 2023. 2. 20. 16:24
In Linux, cd is a command-line utility used to change the current working directory. Here is a table of common options for the cd command in Linux:
OptionDescription
No options Changes the current working directory to the user's home directory - Changes the current working directory to the previous working directory . Refers to the current directory .. Refers to the parent directory And here are some simple examples of how to use the cd command:
- To change the current working directory to the user's home directory, use the following command:
cd- To change the current working directory to a specific directory, specify the directory name as an argument to the cd command:
cd /path/to/directory- To change the current working directory to the previous working directory, use the following command:
cd -- To refer to the current directory, use the following command:
cd .This will have no effect, as it simply refers to the current directory.
- To refer to the parent directory, use the following command:
cd ..This will change the current working directory to the parent directory of the current directory.
'linux' 카테고리의 다른 글
How to copy file or directory in linux (cp) (0) 2023.02.20 How to delete file and directory in linux (rm) (0) 2023.02.20 How to make directory, folder in Linux (mkdir) (0) 2023.02.20 How to read ls result (0) 2023.02.20 Linux file list (ls) (0) 2023.02.20