How to Enable ‘sudo’ on an user account on Debian 10 “Buster”

How to Enable ‘sudo’ on an user account on Debian 10 “Buster”

The command “sudo” is used to run a command with root privilege in your linux machine. In Debian 10 “buster” you might face permission issue when you run a command using “sudo”. When you don’t have sudo permission you will get an alert “Username is not in the sudoers file”.

Solve the problem “Username is not in the sudoers file”

To add the user in “sudo” group follow the instruction.

  1. Login to your user and open the terminal.
  2. Start becoming superuser with typing “su” in the terminal. Enter your root password.
  3. Now install “sudo” with this command
    apt install sudo

     

  4. For Debian 9 and older version: to add the user to “sudo” group type
    adduser username sudo

    *change the “username” with your username.

  5. For Debian 10 “Buster” :
    /sbin/adduser username sudo

    *change the “username” with your username.

  6. Now log out and log in with that username.
  7. Open a terminal and type
    sudo echo 'Hello, world!'

     

  8. If everything goes right you will see “Hello, world!” on your terminal.

 

You may also like...

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments