DEV Community

loading...

Discussion on: Linux Commands (CLI) To Get You Started

Collapse
ricobrase profile image
Rico Brase

A little correction:

cd / doesn't move to previous directory, but to the filesystem root (e.g. where the folders etc, home and var are located).

To move to the previous directory, you can use:

cd -
Enter fullscreen mode Exit fullscreen mode

And the home directory doesn't necessary have to be the "first directory" (a session can start outside of the users home directory).
cd ~ always changes directory the current users home (which can, but doesn't have to be the "first directory" after login).

Also quite helpful:
To go up one level (e.g. move out of the current folder), you can use:
cd .. - .. means "the directory above the current one".


Still a great overview over the most basic CLI commands on Linux-based operating systems, thank you!

Collapse
larymak profile image
lary mak Author

I appreciate for the correction, thank you