LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Logging on as root from The Terminal (https://www.linuxquestions.org/questions/linux-general-1/logging-on-as-root-from-the-terminal-180485/)

bobbasic2002 05-11-2004 07:19 PM

Logging on as root from The Terminal
 
Hi,

How can I log on as root from "The Terminal" run a script and then go back to my acutal logged in user?

Any help is greatly appreciated.

Thanks,
Bob

leonscape 05-11-2004 07:30 PM

The command su will do this for you.

su
password: (enter the password, nothing will be shown )

To go back to being a normal user type exit.

Tinkster 05-11-2004 07:32 PM

Or, instead of su'ing, do this:
su -c "command"


Cheers,
Tink

kalidasN 03-16-2014 06:44 PM

$sudo su
$Enter your password
$

to return to normal user privileges:
$exit


All times are GMT -5. The time now is 07:41 AM.