Linux Comm Usermod
# Linux usermod Command
[ Linux Command Manual](#)
The Linux usermod command is used to modify a user account.
usermod can be used to modify various settings of a user account.
### Syntax
usermod
**Parameter Description**:
* -c Modify the comment field of the user account.
* -d Modify the user's home directory.
* -e Modify the account expiry date.
* -f Modify the number of days after password expiration before the account is disabled.
* -g Modify the user's primary group.
* -G Modify the user's supplementary groups.
* -l Modify the user account name.
* -L Lock the user's password, making it invalid.
* -s Modify the shell used after user login.
* -u Modify the user ID.
* -U Unlock the password.
### Examples
Change the login directory
# usermod -d /home/hnlinux root
Change the user's uid
# usermod -u 777 root
[ Linux Command Manual](#)
YouTip