I can login as root on the terminal but not on the console what is the problem? enter image description here

enter image description here

1 Answer 1


The sudo command lets you execute a command as another user (such as root) if you are part of the sudo-group. You do not actually log in as that user. The password you use with the sudo command is the password of the account you are currently logged into.

Logging in as root on tty2 (your first screenshot) would be the same as running the su command on the X-window terminal.

  • then can i login as root from the start? or do i have to borrow the authority of root by sudo command every time i log in?
    – user409173
    Commented Apr 28, 2020 at 7:01
  • unix.stackexchange.com/q/26006/5132 shows what this answer is missing.
    – JdeBP
    Commented Apr 28, 2020 at 7:23
  • For security reasons you usually do not want to login as root at boot (you could change this of course but it is not recommended to do so). What you can do is execute the su command in the X-window terminal and login as root and type exit after you are done to drop back to your original account. Or indeed prefix the command with sudo (see this answer for executing multiple commands without typing sudo everytime). Commented Apr 28, 2020 at 11:16
  • Or do what you did by spawning a new shell with sudo -i / sudo sh Commented Apr 28, 2020 at 11:24

You must log in to answer this question.