Wednesday, June 15, 2011

--- LOGGING IN AS ROOT ---

To login as root you need to enter the command su (switch user).
------------------------------------------
[ray@my_system ~]$ su
password:
------------------------------------------
You are prompted for the password to the root account. It maybe that you need to do sudo su I will explain why later on. Don´t stay logged in as root no more than you need. If you only need to do one command as root its a better practice to simply use the command sudo in front of the command you want executed. Sudo is an escape to root just for that command, after which you are returned to you normal user mode. If you have administrative tasks to do and switch to root using su you simply go back to a account by executing the command su user. You could also simply issue exit to return to your account.

No comments:

Post a Comment