Unix commands - cd

/ #Bash

In this short post, I'll explain how and what you can do with the unix command "cd"


"cd" is short for "change directory". You use this to go from one directory (or folder) to another. You have a couple of different ways to use this command, and here comes a few examples of them.


# Go back one folder
cd ..

# Go to a folder (in the same folder you are)
cd folder_name

# Go to a specific path
cd /var/www

# Go back to the folder you were in
cd -

# Go to your home folder
cd ~

This is usually the "cd" commands I use. If you got any good tips for other ways to use "cd", please leave a comment below.


No comments yet...

Add comment


Subscribe to my weekly newsletter. One time per week I will send you a short summary of the tutorials I have posted in the past week.