How Do I Change to Root in Linux?

How Do I Change to Root in Linux?
Contents

To change user to root account, simply run “su” or “su –” without any arguments.

How do I get to root in Linux?

File & Directory Commands

  1. To navigate into the root directory, use “cd /”
  2. To navigate to your home directory, use “cd” or “cd ~”
  3. To navigate up one directory level, use “cd ..”
  4. To navigate to the previous directory (or back), use “cd -“

2 июл. 2016 г.

How do I revert back to root?

in terminal. Or you can simply press CTRL + D . Show activity on this post. Just type exit and you will leave the root shell and get a shell of your previous user.

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.