A sudo user lets you manage a Linux VPS without logging in as root for every task. This is safer for daily administration and makes it easier to track who has access.

Connect to the VPS as root first, then replace username with the user you want to create.

adduser username
usermod -aG sudo username

On AlmaLinux, Rocky Linux, or Oracle Linux, use the wheel group instead:

adduser username
passwd username
usermod -aG wheel username

Open a new SSH session and test:

ssh username@your.vps.ip
sudo whoami

If the command returns root, sudo is working. Keep the root login available until you have confirmed the new user can log in and run sudo commands.

  • 0 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

How to connect to a Linux VPS with SSH

SSH is the normal way to manage a Linux VPS. It gives you a terminal on the server so you can...

How to update packages on a Linux VPS

Keeping packages updated helps patch security issues and keeps server tools compatible. Run...

How to secure SSH on a Linux VPS

SSH is the main way to manage a Linux VPS, so it should be secured before the server is used for...

How to check disk usage on a Linux VPS

Disk usage issues can stop updates, backups, logs, databases, and game saves from writing...

How to check CPU and RAM usage on a Linux VPS

High CPU or RAM usage can cause lag, slow command responses, failed updates, or game servers...