Skip to content

Latest commit

 

History

History
38 lines (22 loc) · 936 Bytes

ubuntu-commands.md

File metadata and controls

38 lines (22 loc) · 936 Bytes

Signing as root

sudo -s

Adding a Non root user sudo useradd -u 1000 -g 1000 username

sudo passwd username

Check user ID for a Username id -u username

Deleting user

sudo userdel username

Deleting user with it's home direcotry

sudo userdel -r username

Check user permissions for a file/directory

ls -l filename You can also use the namei -m command followed by the file or directory path to output all of the permissions in the path in a vertical list

namei -m /path/to/file

List all users on ubuntu

compgen -u

Change folder ownership to a certain user

sudo chown -R username:username /path/to/folder