Grant administrative privileges to user on Ubuntu server

Learn how to add a non-root user to the sudo group on your Ubuntu server to grant administrative privileges.

1 min
LinuxSSHServerSudoUbuntu

When you create a new user on Ubuntu, it does not have administrative privileges by default. On Linux in general, administrative privileges mean the user can execute commands via the sudo command, elevating their privileges to the root user for that command.

To grant administrative privileges, all we need to do is add the user to the sudo group.

Root session
usermod -aG sudo deployer
Non root session
sudo usermod -aG sudo deployer

Replace deployer with your actual username

That’s it. You can now type ‘sudo’ before any command to run it with root privileges.