3

Linux常用命令-10:cd

 2 years ago
source link: https://xugaoxiang.com/2022/06/02/linux-cmds-10-cd/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

cdchange directory 的缩写,意思就是进入到另一个目录,它是命令行中最常用的操作。这里的目录可以是绝对路径(如 /usr/lib),也可以是相对路径(如 ../../)

语法格式:cd [参数] [目录名]

常用参数:

6e61cfdad5b58ddc.png
# 切换到目录/var/www
cd /var/www

# 切换到父目录
cd ../

# 回到我的主目录
cd ~

# 回到切换前的目录,比如从目录A切换到目录B,执行命令后,就是回到目录A,对于目录特别深的场景,非常方便
cd -

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK