Ask Your Question

How do you log in as root in Fedora?

asked 2015-08-10 12:18:45 -0500

mywolfshepherd gravatar image

updated 2017-01-13 14:54:49 -0500

mattdm gravatar image

I need to do something which requires administrative privileges. How do I log in as the root user in Fedora?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2015-08-10 13:13:58 -0500

sideburns gravatar image

updated 2015-08-10 13:15:40 -0500

Welcome to ask.fedora. That's a good question you ask. Generally, logging into a GUI as root is not recommended because it's far too easy to mess things up. In Fedora, it's disabled by default for safety reasons. I know that this can be changed, but not how, because I've never had a reason to do it. If you're using a terminal, and know the root password (If you installed Fedora yourself, you should because setting it is part of the install process.) you can use one or another form of the su command to become root, either until you exit that login or, if you've used su -c until that one command is complete. Or, if your account is in the wheel group, making it an Administrator, you can use sudo and your own password in place of su -c. If you need more help, either edit your question or make a comment below this because you only get to make one answer per question.

edit flag offensive delete link more


To open an entire shell via sudo, there exists sudo -s as well, albeit with the same caveats.

BRPocock gravatar imageBRPocock ( 2015-08-10 14:17:01 -0500 )edit

what if i will using sudo, and the terminal tell me about my user account not in sudoers. first, i have added my account user to wheel group with usermod command, please giveme the example of the visudo in fedora 22, with working sudo. thanks

yonkyunior gravatar imageyonkyunior ( 2015-08-10 16:58:15 -0500 )edit

I think that you need to log out and back in for a change like that to be recognized. If not, somebody who uses sudo can probably give you more assistance.

sideburns gravatar imagesideburns ( 2015-08-10 17:13:56 -0500 )edit

i have tried that..log out and login again. shutdown and turn it on again. i think fedora doesn want to know me.. haha so for now, i just using $ su to install any package.

yonkyunior gravatar imageyonkyunior ( 2015-08-10 17:22:45 -0500 )edit

Try running the command groups in a terminal to find out exactly what groups your user is in.

sideburns gravatar imagesideburns ( 2015-08-10 18:28:38 -0500 )edit

answered 2015-08-10 13:06:29 -0500

aeperezt gravatar image

You can do ctl+alt+F3 then login as root or you can login to your user open a terminal and then

su -

to login as root

If you need to issue a command and has access as administrator you can do

sudo command

Hope this help

edit flag offensive delete link more


Interesting timing; I think we were both typing at the same time.

sideburns gravatar imagesideburns ( 2015-08-10 13:16:12 -0500 )edit

yes it looks like

aeperezt gravatar imageaeperezt ( 2015-08-10 14:15:37 -0500 )edit

answered 2015-08-14 04:40:17 -0500

ADITYA BAYANA gravatar image

You can login as root directly from the login screen by clicking on the "Not listed?" option and enter username as root and password will be the root password.

edit flag offensive delete link more


This doesn't work on kde: no 'Not Listed' pull-down. On KDE, go to System Settings -> Startup-Shutdown -> Login Screen -> Advanced and change the minimum UID to '0' from '1000'. Save (requires your user password). Now reboot you will see root listed as a login user along with every other user w a uid < 1000.... I can't see how to remove them from the KDE login screen... but you only see before you log in, anyway!

Dyspeptic Curmudgeon gravatar imageDyspeptic Curmudgeon ( 2016-02-07 19:19:27 -0500 )edit

Question Tools


Asked: 2015-08-10 12:18:45 -0500

Seen: 84,986 times

Last updated: Jan 13 '17