2019-10-01 13:53:10 +00:00
# cd
2019-10-01 13:15:38 +00:00
2019-10-04 12:10:46 +00:00
If you didn't already know, the `cd` command is very simple. It stands for 'change directory' and it does exactly that. It changes the current directory to the one specified. If no directory is specified, it takes you to the home directory. Additionally, using `cd ..` takes you to the parent directory.
2019-10-01 13:15:38 +00:00
2019-10-07 23:16:25 +00:00
## Examples
2019-10-01 13:53:10 +00:00
```shell
2019-10-01 13:15:38 +00:00
/home/username> cd Desktop
/home/username/Desktop> now your current directory has been changed
```
2019-10-01 13:53:10 +00:00
```shell
2019-10-01 13:15:38 +00:00
/home/username/Desktop/nested/folders> cd ..
2019-10-01 13:53:10 +00:00
/home/username/Desktop/nested> cd ..
2019-10-01 13:15:38 +00:00
/home/username/Desktop> cd ../Documents/school_related
/home/username/Documents/school_related> cd ../../..
/home/>
```
2019-10-01 13:53:10 +00:00
```shell
/home/username/Desktop/super/duper/crazy/nested/folders> cd
/home/username> cd ../../usr
/usr> cd
2019-10-07 23:17:46 +00:00
/home/username>
2019-10-01 13:53:10 +00:00
```
2019-10-07 23:17:51 +00:00
Using `cd -` will take you to the previous directory:
```shell
/home/username/Desktop/super/duper/crazy/nested/folders> cd
/home/username> cd -
/home/username/Desktop/super/duper/crazy/nested/folders> cd
```