When managing a Linux VPS, it is recommended to create a normal user account instead of performing all actions as the root user.
Using a separate user account helps improve security and reduces the risk of accidental system changes.
This guide explains how to create a new user and give it administrative permissions.
Common Linux distributions used on VPS servers include:
Ubuntu
Debian
First, connect to your server using SSH.
Linux servers are accessed using:
OpenSSH
Example:
ssh root@your_server_ipOnce connected, you will have access to the server terminal.
To create a new user, run the following command:
adduser usernameReplace username with the name you want for the new account.
Example:
adduser adminuserThe system will ask you to create a password and optional user information.
To allow the new user to run administrative commands, add the user to the sudo group.
Run:
usermod -aG sudo usernameExample:
usermod -aG sudo adminuserThis allows the user to run commands with administrative privileges using sudo.
Log in using the new account to make sure everything works correctly.
Example:
ssh username@your_server_ipYou can test administrative permissions by running:
sudo apt updateIf the command runs successfully, the user has administrative access.
Using a separate user account improves server security because:
The root account is used less frequently
Administrative actions require sudo confirmation
It reduces the risk of accidental system damage
To create a new user on a Linux VPS:
Connect to your server using SSH
Run adduser username
Add the user to the sudo group
Test the new account
Using a dedicated administrative user is considered a best practice when managing Linux servers.