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

  • 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
主站蜘蛛池模板: 乌兰县| 黄龙县| 康乐县| 白山市| 盘锦市| 安达市| 土默特左旗| 信阳市| 吴川市| 开原市| 子长县| 延吉市| 嘉荫县| 镇宁| 仁寿县| 高唐县| 承德市| 洞口县| 伽师县| 泗阳县| 曲靖市| 洮南市| 扎囊县| 辽阳市| 鄂州市| 三都| 鄂温| 集贤县| 东明县| 邛崃市| 温泉县| 新巴尔虎左旗| 利川市| 修文县| 清水河县| 界首市| 垦利县| 上栗县| 富裕县| 云霄县| 伊金霍洛旗|