add a user
Create an account with a home folder and a password, and let it use sudo if it should.
userssystem
-
sudo adduser NAMEcreate the user, its home folder and its password, asking for each (Debian, Ubuntu)
-
sudo useradd -m -s /bin/bash NAMEthe same on any Linux: a home folder (-m) and bash as its shell
-
sudo passwd NAMEset its password (needed after useradd)
-
sudo usermod -aG sudo NAMElet it use sudo; the group is `wheel` on Fedora, RHEL and Arch
-
id NAMEcheck its groups
-
sudo -iu NAMEopen a shell as that user, to try it
- Keep the
-ainusermod -aG: without it, the user is taken out of every other group. - A new group takes effect at the user's next login.
- macOS: System Settings, Users & Groups, or
sysadminctl -addUser(see its manual).
adduseruseraddusermodpasswd
Each has a page in lore: lore adduser opens it.
list users and groups
See the accounts on this machine, the groups, and who is in each.
change permissions of a folder and everything in it
Give a folder, its subfolders and its files the permissions or the owner they need, without making them open to everyone.
count the processors
How many processors and cores this machine has, and what they are.
find what killed a process
A program vanished or says "Killed": usually the kernel ran out of memory and stopped it. Find out.