I installed Debian a day ago and I'm very new to Linux please forgive me if I miss something obvious but: whenever I use sudo command it asks me for the current user password but the current user doesn't have permission to use sudo so I have to use su and run my command there but the command I installed there only works there not in my user I used popos before and I think I was the root user there because sudo worked fine how do I login as root? In my login page (sddm) there is only 1 user.

EDIT: Can I somehow don't make a normal user in the installation? what if I leave the normal user password and username empty? will there only be root user that I can login with?

  • It looks like you do but just to be clear, do you know the root password? Mar 5, 2022 at 18:31
  • @NasirRiley yes I know, I made it Mar 5, 2022 at 18:35
  • What version of Debian are you using? Mar 5, 2022 at 18:41
  • @NasirRiley Debian 11 Mar 5, 2022 at 18:55
  • "Can I somehow don't make a normal user in the installation" that would be a really bad idea Mar 5, 2022 at 19:41

1 Answer 1


It depends on how you've setup your system at installation. If you've created a root account by entering a password for the root account during installation you can switch to a different tty with Ctrl+Alt+F2 and login as root from there.

You can then give your users account the permission to escalate privileges via sudo.

give user privileges to run sudo

add user to sudo group

Debian is by default configured to allow all members of the sudo group to use the sudo privilege escalation.

The simplest way would be to add your user to the sudo group via usermod -aG sudo yourusername

/etc/sudoers file

You can also edit the sudoers file. Note that you should never edit this file manually, it could render your system unusable. Instead use visudo as it checks the file for errors after editing.

  1. run visudo
  2. add yourusername ALL=(ALL:ALL) ALL to the end of the file
  3. close and save the file via Ctrl+X, then Y and Enter
  • 1
    But then I have no GUI. How should I set it up to make something like popos? I will reinstall it like that Mar 5, 2022 at 18:39
  • What do you mean by "make something like popos"? Mar 5, 2022 at 18:40
  • 1
    I'm the root user there and sudo works fine and I can use apt and other things Mar 5, 2022 at 18:43
  • Well, I am not sure if I understand your problem correctly. You don't need to use sudo as the root user, but you might want to add your user to the sudo group to give your user the privileges to run sudo. Mar 5, 2022 at 18:45
  • 1
    Ok, I add myuser ALL=(ALL:ALL) ALL to visudo but now what's the usage of root user? It feels like something is wrong Mar 5, 2022 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .