Manage the people and services on a machine — see who you are and who is logged in, add and remove users, set passwords, and grant admin rights by adding a user to the right group.
Before changing anything, know your own account. whoami prints your username. id shows your numeric user id (uid), your primary group, and every group you belong to — group membership is how Linux grants extra powers, so this is the command you check when something is unexpectedly denied.
Your username
whoamiYour user id, primary group, and all the groups you're in
idJust the list of groups you belong to
groupsOn Ubuntu/Debian, adduser is the friendly tool — it creates the account, a home folder, and prompts you to set a password, all in one interactive step. (The lower-level useradd exists too but does less for you.) Creating users is an admin action, so it needs sudo.
Create a new user interactively (makes the home folder, asks for a password)
sudo adduser deploySet or reset a user's password directly
sudo passwd deployConfirm the account now exists (look for it in the user database)
grep deploy /etc/passwdYou do not hand out root access directly — you add a user to a group that already has it. On Ubuntu/Debian that group is sudo (it is wheel on some other systems). usermod -aG adds a user to a group; the -a ("append") is critical — without it you would replace all their groups instead of adding one. The change takes effect on their next login.
Add "deploy" to the sudo group so they can run admin commands
sudo usermod -aG sudo deployVerify the new group membership
groups deploy(The user must log out and back in for it to take effect)
When an account is no longer needed, remove it. deluser removes the account but leaves their home folder behind by default; add --remove-home to delete their files too. Cleaning up unused accounts is basic hygiene — every extra login is one more way in.
Remove the user but keep their home folder
sudo deluser deployRemove the user AND delete their home folder and files
sudo deluser --remove-home deploy