Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-05-2013, 07:10 PM   #1
LQ Newbie
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
switch to root user


I am starting to learn linux operation system and want to know how to change to root account after logged in.


Old 10-05-2013, 07:38 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,288

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Depending on how your distribution is set up, either "su" or "sudo" are generally used.
Old 10-05-2013, 07:45 PM   #3
Registered: May 2004
Location: USA
Distribution: Arch Linux
Posts: 415

Rep: Reputation: 82

Checking the manual page for each command will give you some details on their usage. You can check their man pages as follows:

man su

man sudo
Old 10-05-2013, 08:04 PM   #4
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Rep: Reputation: Disabled
Word of advice:

Be careful when typing in commands under root. Cause the damages could be permanent
Old 10-05-2013, 08:33 PM   #5
Senior Member
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,013

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Further to the previous replies it might be worth clarifying that some distros (e.g. Ubuntu, Mint) have the root account disabled by default. As a result, you cannot become root with the su command. You can however launch a root shell using
sudo -s
Old 10-06-2013, 01:59 AM   #6
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Addtionally for some distros the very first user account has default access to "sudo" that can be used.

user's password
Old 10-06-2013, 09:58 PM   #7
Registered: Oct 2013
Location: USA, a place where an open-source document (The Constitution) is the law of the land.
Distribution: Debian (because of their underlying philosophies) running AwesomeWM (because of its functionality).
Posts: 34

Rep: Reputation: Disabled
Depending on your distro (please note the use of absolute filepaths, it is good practice to use such):

/bin/sudo -i
(i as in interactive)


/bin/su -l
(l as in login)
Old 10-07-2013, 02:13 AM   #8
shiv garg
LQ Newbie
Registered: Sep 2013
Location: Amritsar
Distribution: fedora 19
Posts: 11

Rep: Reputation: Disabled
just go to terminal and type su
and then your password

you will be logged in as root user

but if you have not set the password for root user

then first set your password for root


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you switch to root user barrythai Ubuntu 22 08-28-2018 08:33 PM
switch to root user bdavide Linux - Newbie 14 05-20-2008 07:44 PM
How do I switch to root user binarybob0001 Programming 4 11-26-2007 03:26 AM
How do I switch ROOT/ADMINISTRATOR to another user?? Balarabay1 Linux - Software 4 07-21-2006 03:54 AM
How switch root to another user? Xiangbuilder Linux - Newbie 1 09-15-2003 07:19 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:48 PM.

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