To add a new user on Alpine Linux, you can use the adduser
command. The adduser
command is a utility for creating new user accounts on the system.
Here is an example of how to use adduser
to add a new user named "john" with a default home directory and a default shell:
adduser john
You will be prompted to enter a password for the new user. Once you have entered a password, the new user will be created and added to the system.
To delete a user from the system, you can use the deluser
command. The deluser
command is a utility for deleting user accounts and their associated files from the system.
Here is an example of how to use deluser
to delete the user "john" and all of their files:
deluser john
Note: You may need to be logged in as the root user or use
sudo
to run theadduser
anddeluser
commands, depending on your system configuration. Consult the documentation and online resources available for more information on the various options and features available with theadduser
anddeluser
commands on Alpine Linux.