Last active
January 16, 2017 12:41
-
-
Save Alex-Just/bac37567bb79b41d1fde89e4333a22fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whoami | |
# Add user to sudoers | |
sudo adduser <username> sudo | |
# Switch user | |
su - user2 | |
# List all local users | |
cut -d: -f1 /etc/passwd | |
# Add a new user | |
sudo adduser new_username | |
# Remove/delete a user, first you can use: | |
sudo userdel username | |
# Then you may want to delete the home directory for the deleted user account : | |
sudo rm -r /home/username | |
# Check which users are logged in: | |
who | |
# Log-out the user by sending the KILL signal to the user-process with: | |
sudo pkill -KILL -u <username> | |
# Get the current group I'm logged in as | |
id -gn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment