0
1

[Mac] [Terminal] cdコマンドの使い方

Last updated at Posted at 2024-07-05

目次

MacOSのディレクトリ構成

directory_structure
drive/ ←ルートディレクトリ
├── Applications/
├── Syetem/
└── Usr/
│   ├── shared/
│   └── personnel(ex. Jochun)/ ←ホームディレクトリ
│       ├── Desktop/
│       ├── Downloads/
│       ├── Documents/
│       ├── .config/
│       ├── .ssh/
│       ├── .zshrc/
│       └── .local/
│       │   ├── .bin
│       │   ├── 

ホームディレクトリ

~はホームディレクトリの印
image.png
引用

cdコマンド

移動

Desktopに移動したい場合

cd Desktop

image.png

1階層上に戻る

cd ..

2階層上に戻る

cd ../..

3階層上に戻る

cd ../../..

同階層の移動

Documentsに移動したい場合

cd ../Documents

ドライブ直下(ルートディレクトリ)に移動する

cd /

ホームディレクトリに移動する

cd ~

参考リンク

0
1
2

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
0
1