添加用户:
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
本文详细介绍了在Ubuntu系统中如何使用命令行添加和删除用户。包括使用'sudo adduser'命令创建新用户,设置密码,填写用户信息,以及使用'sudo userdel'命令删除用户的完整流程。
1万+

被折叠的 条评论
为什么被折叠?



