#adduser
Create a user (friendly)
sudo adduser namesudo adduser aliceAsks for a password and details, creates the home folder (Debian and Ubuntu)
adduserCreate a user (friendly)
sudo adduser namesudo adduser aliceAsks for a password and details, creates the home folder (Debian and Ubuntu)
useraddCreate a user (low level)
sudo useradd [options] namesudo useradd -m -s /bin/bash bobCreate bob with a home folder and the bash shell
sudo useradd -m -G sudo,www-data bobAlso add him to groups (the groups must already exist)
usermodChange a user
sudo usermod [options] namesudo usermod -aG sudo aliceAdd alice to the sudo group (the -a keeps her other groups)
sudo usermod -s /bin/zsh aliceChange the login shell
sudo usermod -L aliceLock the account
userdelDelete a user
sudo userdel [-r] namesudo userdel -r bobDelete bob and his home folder
passwdSet a password
passwd [user]passwdChange your own password
sudo passwd aliceSet another user's password
groupaddCreate a group
sudo groupadd namesudo groupadd developersCreate the group
chagePassword ageing
sudo chage [options] usersudo chage -l aliceShow when the password expires
sudo chage -M 90 aliceForce a change every 90 days
who / wWho is logged in
who | wwhoUsers logged in now
wUsers and what each one is running
lastLogin history
last [user]last -n 10The last ten logins
sudo lastbFailed login attempts
SSH Command is a desktop app for Mac, Windows and Linux that puts a real terminal, SFTP file panes, a sudo switch and a searchable Linux command finder in one window. Type what you want to do, and send the command to your server with one click.
Download free Windows commands with examples SFTP & FTP client