添加用户:
ubuntu@ubuntu:/home$ sudo adduser username
出现如下的信息:
Adding user username' ... Adding new group username' (1001) ... Adding new user username' (1001) with group `dengyanhui' ... Creating home directory `/home/username' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for username Enter the new value, or press ENTER for the default Full Name []: dahui Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y
输入如下命令:
ubuntu@ubuntu:~$ ls /home
显示如下:
引用
username ubuntu
说明username用户添加成功
删除用户:
ubuntu@ubuntu:/home$ sudo userdel username