How to login as root in linux shell?
|
feedback
|
migrated from stackoverflow.com Jul 20 '10 at 10:39
This question came from our site for professional and enthusiast programmers.
|
The correct way to login as root is to type:
This works on systems where sudo is inavailable or not configured. Some distributions disallow logging in as root and then one should run his commands like this:
| |||||
feedback
|
|
I'd comment on sagar's answer if I could, as I wish to add that while
will log you in as root in the shell, it will move you to its home directory (/root) as well. Edit: As said by Andreas,
would instead allow you to remain in your current directory, which may be useful. | |||||
feedback
|
