Quick Answer: How to Go to Root Directory in Linux?
Contents File & Directory Commands to Navigate into the Root Directory, Use “Cd /” to Navigate to Your Home Directory, Use “Cd” or “Cd ~” to Navigate up One...
Contents
File & Directory Commands
- To navigate into the root directory, use “cd /”
- To navigate to your home directory, use “cd” or “cd ~”
- To navigate up one directory level, use “cd ..”
- To navigate to the previous directory (or back), use “cd -“
How do I get to the root directory in Unix?
The most commonly used options are listed below.
- cd — Returns you to your login directory.
- cd – — Returns you to your previous working directory.
- cd ~ — Also returns you to your login directory.
- cd / — Takes you to the entire system’s root directory.
- cd /root — Takes you to the home directory of the root user.
Must Read
How do I get to root directory in CMD?
To access another drive, type the drive’s letter, followed by “:”. For instance, if you wanted to change the drive from “C:” to “D:”, you should type “d:” and then press Enter on your keyboard. To change the drive and the directory at the same time, use the cd command, followed by the “/d” switch.