3

Linux 命令 --- cd

 2 years ago
source link: https://blog.diqigan.cn/posts/cd-command-in-linux.html
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.

Linux 命令 --- cd

发表于

2018-11-29 更新于 2019-08-23 分类于 coding

阅读次数: 135 Valine:
本文字数: 191 阅读时长 ≈ 1 分钟

cd 命令全称 “change directory”, 用于切换当前工作目录 , 是 Linux 下最基础的命令之一.

cd [path]
  • [path] 表示目标路径,可以是相对路径,也可以是绝对路径.
  • 跳转到指定目录

    cd /etc
  • 跳转到根目录

    cd /
  • 跳转到用户主目录

    cd ~
    cd

    上述两个命令效果相同.

  • 跳转到上一层目录

    cd ../
  • 跳转到上一次跳转的目录 (同一 shell 内有效)

    cd -1
微信公众号
扫码关注,一起进步!

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK