Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux usermod Command

Linux usermod Command

Linux Command Reference Linux Command Reference

The Linux usermod command is used to modify user accounts.

usermod can be used to modify the various settings of a user account.

Syntax

usermod [-LU][-c <备注>][-d <登入目录>][-e <有效期限>][-f <缓冲天数>][-g <群组>][-G <群组>][-l <帐号名称>][-s ][-u ][用户帐号]

Parameter Description:

Example

Change the login directory

# usermod -d /home/hnlinux root

Change a user's uid

# usermod -u 777 root

Linux Command Reference Linux Command Reference