官术网_书友最值得收藏!

The cd command

Where pwd or $PWD gets the current working directory for the shell, the cd Bash builtin command sets the working directory:

$ pwd
/home/bashuser
$ cd /tmp
$ pwd
/tmp

When issued with no arguments, the cd command defaults to the current user's home directory. Again, it does this by reading the $HOME environment variable first, if it can:

$ cd
$ pwd
/home/bashuser

You can change to the parent of the current directory with the .. name:

$ pwd
/home/bashuser
$ cd ..
$ pwd
/home
主站蜘蛛池模板: 罗源县| 平昌县| 勐海县| 东港市| 临清市| 勃利县| 波密县| 孝义市| 安福县| 政和县| 五莲县| 定南县| 始兴县| 鹰潭市| 从江县| 呼图壁县| 璧山县| 嘉定区| 雷波县| 溧水县| 巨鹿县| 香港| 晋中市| 阳东县| 肇州县| 鲜城| 荥阳市| 唐海县| 化德县| 新丰县| 永昌县| 青龙| 邵武市| 金平| 宁明县| 且末县| 闻喜县| 米泉市| 精河县| 遂宁市| 甘洛县|