怎么在ubuntu中添加和刪除用戶(hù)

小億
88
2024-03-25 10:07:41

要在Ubuntu中添加用戶(hù),可以使用以下命令:

sudo adduser username

其中,將"username"替換為要添加的用戶(hù)名。系統(tǒng)會(huì)提示您設(shè)置密碼和添加用戶(hù)的其他信息。

要?jiǎng)h除用戶(hù),可以使用以下命令:

sudo deluser username

其中,將"username"替換為要?jiǎng)h除的用戶(hù)名。系統(tǒng)會(huì)提示您確認(rèn)刪除操作。您還可以使用--remove-home選項(xiàng)刪除用戶(hù)的家目錄,使用--remove-all-files選項(xiàng)刪除用戶(hù)的所有文件。

0