# Novice Question: Best way to log into root to do some admin things



## SpoofMeister (Nov 20, 2016)

I love FreeBSD so far; prepping to make it the host OS on my primary personal PC.

I installed KDE and see that I do have the ability to use su and sudo for various things.  However, let's say I need to get a root command prompt before the desktop loads, what's the best way to do that?  Single user mode?  I so far have been using single user mode for some installs but I wonder if there's a more popular / useful way to log into root.

One thing I noticed when the system boots up into KDE is I get a login prompt but it pretty quickly disappears: i don't have time to enter root and the password.  Can I / should I stop the desktop from quickly loading to log into root?


----------



## tobik@ (Nov 20, 2016)

SpoofMeister said:


> One thing I noticed when the system boots up into KDE is I get a login prompt but it pretty quickly disappears: i don't have time to enter root and the password


Switch to a different virtual console with Ctrl-Alt-F1, Ctrl-Alt-F2, ... You can get back to KDE with Ctrl-Alt-F9.

Also see https://www.freebsd.org/doc/handbook/consoles.html


----------



## tingo (Nov 20, 2016)

Another way is to simply don't run a (Xorg) display manager at boot. This way the machine always start in "console mode".
When you are ready to go graphical, simply login on a console as your user, and issue `startx`, `startfce4` or whatever command that starts the desktop environment of your choice.
I like it this way, YMMV.


----------

