How To Install Usermod?

How To Install Usermod?

usermod

Modifies a user account.

Maintainer: Shadow package maintainers



Section: admin

Install usermod

  • Debian apt-get install passwd Click to copy
  • Ubuntu apt-get install passwd Click to copy
  • Alpine OS apk add shadow Click to copy
  • Arch Linux pacman -S shadow Click to copy
  • Kali Linux apt-get install passwd Click to copy
  • Fedora dnf install shadow-utils-2 Click to copy
  • Raspbian apt-get install passwd Click to copy

Modifies a user account.

How to use usermod?

Below are few example commands for usermod that you can use in the terminal.

Change a user's name:
usermod -l newname userClick to copy
Add user to supplementary groups (mind the whitespace):
usermod -a -G group1,group2 userClick to copy
Create a new home directory for a user and move their files to it:
usermod -m -d /path/to/home userClick to copy
Installing usermod command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, Fedora and Raspbian operating systems. Once you run the command it will install the latest version of usermod 2024 package in your OS.