Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-11-2004, 08:19 PM   #1
LQ Newbie
Registered: May 2004
Posts: 2

Rep: Reputation: 0
Question Logging on as root from The Terminal


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.

Old 05-11-2004, 08:30 PM   #2
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
The command su will do this for you.

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

To go back to being a normal user type exit.
Old 05-11-2004, 08:32 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

Old 03-16-2014, 07:44 PM   #4
LQ Newbie
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
$sudo su
$Enter your password

to return to normal user privileges:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in text based terminal when logging as root MSafty SUSE / openSUSE 3 08-22-2005 04:14 PM
Problem in text based terminal when logging as root MSafty Linux - Software 2 08-17-2005 12:09 AM
Logging into Mandrake 9.2 from terminal fleeced Linux - Newbie 1 08-15-2004 02:05 PM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 03:55 AM
terminal history logging alue Linux - General 4 03-15-2002 02:59 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration