Easy Tutorial
❮ Linux Comm Exit Linux Comm Chattr ❯

Linux usermod Command

Linux Command Manual

The Linux usermod command is used to modify user accounts.

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

Syntax

usermod [-LU][-c <comment>][-d &lt;login directory>][-e &lt;expiration date>][-f &lt;inactive days>][-g <group>][-G <group>][-l &lt;account name>][-s <shell>][-u <uid>][user account]

Parameter Description:

Examples

Change the login directory

# usermod -d /home/hnlinux root

Change the user's UID

# usermod -u 777 root

Linux Command Manual

❮ Linux Comm Exit Linux Comm Chattr ❯