Linux cheatsheet

Handy linux things.

linux
server
newuser
ssh
root
adduser
linux

Published 4 years ago

Adding a new user to your Linux server

In your terminal run the below command. It will ask you to set a new password, create a randomly generated one to be safe. After this it will also ask you to set some user information, which you can skip.

adduser username

Sudo permissions

Grant sudo permissions to your new username. To see what permissions you have set already on an account by running:

id username

Add sudo permissions:

usermod -aG sudo username

Change to the new user by running

su - username

Confirm you are now the new user by running:

whoami