Linux learning 03

Change the working directory command
1. pwd command

pwd command displays the user's current working directory in which the format is "pwd [options]."

[root@linuxprobe ~]# pwd
/root

2. cd command
cd command for switching the working path, the format of "cd [directory name]."
This command should be the most commonly used a Linux commands. You can switch to a different working directory by cd command to quickly and flexibly. In addition to the common mode switching directory, you can also use "cd -" command to return to the primary directory located using "cd .." command to enter the parent directory, and using the "cd ~" command to switch to the current user's home directory, or will use the "cd ~ username" to switch to another user's home directory. For example, "cd path" mode switching in the / etc directory:

[root@linuxprobe ~]# cd /bin
[root@linuxprobe bin]# pwd
/bin
[root@linuxprobe bin]# cd ..
[root@linuxprobe /]# pwd
/
[root@linuxprobe /]# cd -
/bin
[root@linuxprobe bin]# pwd
/bin

Linux learning 03Linux learning 03

Guess you like

Origin blog.51cto.com/2948611/2450934