␡
- Starting Up the Terminal
- Getting Started
- Building Pipelines
- Running Commands as the Superuser
- Finding Help
- Moving Around the Filesystem
- Manipulating Files and Folders
- System Information Commands
- Searching and Editing Text Files
- Dealing with Users and Groups
- Getting Help on the Command Line
- Searching for Man Files
- Using Wildcards
- Executing Multiple Commands
- Moving to More Advanced Uses of the Command Line
This chapter is from the book
Dealing with Users and Groups
You can use the following commands to administer users and groups.
- adduser: The adduser command creates a new user. To create a new user, simply type sudo adduser $ loginname . This creates the user's home directory and default group. It prompts for a user password and then further details about the user.
- passwd: The passwd command changes the user's password. If run by a regular user, it will change his or her password. If run using sudo, it can change any user's password. For example, sudo passwd joe changes Joe's password.
- who: The who command tells you who is currently logged into the machine.
- addgroup: The addgroup command adds a new group. To create a new group, type sudo addgroup $groupname .
- deluser: The deluser command removes a user from the system. To remove the user's files and home directory, you need to add the -remove-home option.
- delgroup: The delgroup command removes a group from the system. You cannot remove a group that is the primary group of any users.