选项
Cd:切换回家目录
Cd ~:切换回本身的家目录
Cd~USERNAME:切换至指定用户的家目录
Cd -:在上一次所在目录与当前目录之间来回切换
注意:bash中,~表示家目录bash
[root@localhost ~]# cd /etc/ [root@localhost etc]# cd - /root [root@localhost ~]# cd - /etc [root@localhost etc]#
[root@localhost ~]# cd ~tom [root@localhost tom]# pwd /home/tom [root@localhost tom]# cd ~ [root@localhost ~]# pwd /root