Skip to content

Latest commit

 

History

History
68 lines (53 loc) · 1.07 KB

cd.md

File metadata and controls

68 lines (53 loc) · 1.07 KB
title description created updated
cd Linux Command
cd command is used to change the current working directory
2019-08-21
2023-10-12

cd command is used to change the current working directory

Changing to a directory with path

cd /path/to/new/directory

change directory to the root directory

 cd /

Change to current logged in user's home directory

cd ~
cd

Change to a directory whih is an immediatsub directy to you rcurrent directory

For example lets take following is your directory structure

├── images
├── movies
│   ├── action
│   └── comedy
└── music

and let's say you are in movies currently, so to go to action you can simply run the following command

cd action
├── images
├── 'My movies'
│   ├── action
│   └── comedy
└── music
cd My\ movies

Going back to immediate parent directoty of current directoty

cd ..

change directory to the last working directory

 cd -