業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

Delete user

Delete user

The command to delete a user is userdel.

When this command is executed, the user information will be deleted, but the user's home directory will be left behind.
If you want to delete the home directory as well, specify "-r" as an option and execute it.

●Delete user

# id nuy ←Check the information of user nuy
uid=5000(nuy) gid=500(tama) 
# userdel nuy ←Delete nuy
# ls -l /home ←Check your home directory.
合計 10
leg sante 
nuy   ←The nuy user will be removed, but the home directory will remain

●Delete the home directory along with it.
If you want to delete the home directory as well, run the userdel command with the option "-r".

# userdel -r nuy
# ls /home ←Check your home directory.
leg sante
↑The nuy user's home directory will also be removed
Copied title and URL