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

  • Bash Quick Start Guide
  • Tom Ryder
  • 92字
  • 2021-07-23 16:58:59

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
主站蜘蛛池模板: 外汇| 武陟县| 黄石市| 浦县| 金寨县| 七台河市| 定襄县| 康定县| 长岭县| 什邡市| 喀喇沁旗| 通江县| 余江县| 晋中市| 上蔡县| 黄龙县| 诸城市| 福海县| 苏尼特左旗| 旬邑县| 庆安县| 隆回县| 神木县| 宝山区| 鄄城县| 彝良县| 韩城市| 松潘县| 喜德县| 陕西省| 河东区| 丰镇市| 江西省| 汉寿县| 垦利县| 鹤山市| 安乡县| 长子县| 黄浦区| 阜康市| 佛山市|