LoginSignup
2
0

More than 3 years have passed since last update.

【Linuxコマンド】 cd コマンド オプション 一覧 【初学者必見】

Posted at

【Linuxコマンド】 cd コマンド オプション 一覧 【初学者必見】

まとめ
Linuxコマンド一覧

cd コマンドとは

ディレクトリを移動するLinuxコマンドです。
"cd" は "change directory"の略です。

cdコマンド 使い方一覧

ルートディレクトリへ移動

/home/hoge
$ cd /

ホームディレクトリへ移動

/
$ cd ~

↑↓同じ意味です。

/
$ cd 

相対パスでの移動

相対パスとは

現在いるディレクトリから見たパスのことです。

/home
$ cd hoge

絶対パスでの移動

絶対パスとは

全体の一番上から見たパスのことです。

/home/hoge
$ cd /test

1つ上の階層

/home/hoge/test
$ cd ..

2つ上の階層へ移動

/home/hoge
$ cd ../..

1つ上の階層のtaroディレクトリへ移動

/home/hoge
$ cd ../taro

-Pオプション

移動先のディレクトリがシンボリックリンクだった場合、シンボリックのターゲットに移動してくれる便利なオプション

/home
$ cd -P hogege

その他のLinuxコマンドのオプション一覧

pwd, mkdir, cd, cat, cp, ls, touch, less, mv, rm, ssh, man, 随時追加中

広告欄

各種開発や構築の請負や初学者向けのメンター業務してます。
ご興味お持ちいただけた方はこちらへどうぞ

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0