linux commands

Basic Linux commands

To list all the users in system.

cat /etc/passwd

To list all the groups in system.

cat /etc/group

To add new user.

sudo adduser username

To add a user to sudo group.

sudo usermod -aG sudo username

To delete user.

sudo deluser username

To delete user and his home directory

sudo deluser --remove-home username

Leave a comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.