Difference between revisions of "cmd/usermod"
< cmd
Jump to navigation
Jump to search
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{hdr/command/linux}} | {{hdr/command/linux}} | ||
==Basics== | ==Basics== | ||
− | + | {{l/cmd|usermod}} is a command for modifying users on a Linux system. | |
* {{l/manpage}} for this system | * {{l/manpage}} for this system | ||
− | == | + | ==How To== |
+ | Assign a user to an additional (non-primary) group: | ||
+ | * <code>usermod -a -G {{arg|groupname}} {{arg|username}}</code> | ||
+ | |||
+ | Note that if you are adding ''yourself'' to another group, the new membership will not take effect unless you log in again (even if you open a new terminal session). To do this without logging out of your GUI session, use <code>sudo login {{arg|your username}}</code> (not sure the last parameter is required). | ||
+ | ==Related== | ||
+ | * [[Linux/groups]]: Linux user/group commands | ||
+ | * {{l/cmd|groups}}: list what groups a user is in | ||
* [[/archive/Red Hat 7]]: 2005 transcription of Red Hat 7 manpage | * [[/archive/Red Hat 7]]: 2005 transcription of Red Hat 7 manpage |
Latest revision as of 22:57, 13 November 2022
Basics
usermod is a command for modifying users on a Linux system.
- manpage for this system
How To
Assign a user to an additional (non-primary) group:
usermod -a -G <groupname> <username>
Note that if you are adding yourself to another group, the new membership will not take effect unless you log in again (even if you open a new terminal session). To do this without logging out of your GUI session, use sudo login <your username>
(not sure the last parameter is required).
Related
- Linux/groups: Linux user/group commands
- groups: list what groups a user is in
- /archive/Red Hat 7: 2005 transcription of Red Hat 7 manpage