mirror of https://github.com/CrimsonTome/tldr.git
groupadd, groupdel, groupmod, groups: update page (#7660)
parent
11bef8b72b
commit
3a104d8676
|
@ -1,16 +1,13 @@
|
||||||
# groups
|
# groups
|
||||||
|
|
||||||
> Print group memberships for a user.
|
> Print group memberships for a user.
|
||||||
|
> See also: `groupadd`, `groupdel`, `groupmod`.
|
||||||
> More information: <https://www.gnu.org/software/coreutils/groups>.
|
> More information: <https://www.gnu.org/software/coreutils/groups>.
|
||||||
|
|
||||||
- Print group memberships for the current user:
|
- Print group memberships for the current user:
|
||||||
|
|
||||||
`groups`
|
`groups`
|
||||||
|
|
||||||
- Print group memberships for a specific user:
|
|
||||||
|
|
||||||
`groups {{username}}`
|
|
||||||
|
|
||||||
- Print group memberships for a list of users:
|
- Print group memberships for a list of users:
|
||||||
|
|
||||||
`groups {{username1}} {{username2}} {{username3}}`
|
`groups {{username1 username2 ...}}`
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
# groupadd
|
# groupadd
|
||||||
|
|
||||||
> Add user groups to the system.
|
> Add user groups to the system.
|
||||||
|
> See also: `groups`, `groupdel`, `groupmod`.
|
||||||
> More information: <https://manned.org/groupadd>.
|
> More information: <https://manned.org/groupadd>.
|
||||||
|
|
||||||
- Create a new Linux group:
|
- Create a new group:
|
||||||
|
|
||||||
`groupadd {{group_name}}`
|
`sudo groupadd {{group_name}}`
|
||||||
|
|
||||||
- Create new group with a specific groupid:
|
- Create a new system group:
|
||||||
|
|
||||||
`groupadd {{group_name}} -g {{group_id}}`
|
`sudo groupadd --system {{group_name}}`
|
||||||
|
|
||||||
|
- Create a new group with the specific groupid:
|
||||||
|
|
||||||
|
`sudo groupadd --gid {{id}} {{group_name}}`
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# groupdel
|
# groupdel
|
||||||
|
|
||||||
> Delete existing user groups from the system.
|
> Delete existing user groups from the system.
|
||||||
|
> See also: `groups`, `groupadd`, `groupmod`.
|
||||||
> More information: <https://manned.org/groupdel>.
|
> More information: <https://manned.org/groupdel>.
|
||||||
|
|
||||||
- Delete an existing group:
|
- Delete an existing group:
|
||||||
|
|
||||||
`groupdel {{group_name}}`
|
`sudo groupdel {{group_name}}`
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
# groupmod
|
# groupmod
|
||||||
|
|
||||||
> Modify existing user groups in the system.
|
> Modify existing user groups in the system.
|
||||||
|
> See also: `groups`, `groupadd`, `groupdel`.
|
||||||
> More information: <https://manned.org/groupmod>.
|
> More information: <https://manned.org/groupmod>.
|
||||||
|
|
||||||
- Change the group name:
|
- Change the group name:
|
||||||
|
|
||||||
`groupmod -n {{new_group_name}} {{old_group_name}}`
|
`sudo groupmod --new-name {{new_group}} {{group_name}}`
|
||||||
|
|
||||||
- Change the group id:
|
- Change the group id:
|
||||||
|
|
||||||
`groupmod -g {{new_group_id}} {{old_group_name}}`
|
`sudo groupmod --gid {{new_id}} {{group_name}}`
|
||||||
|
|
Loading…
Reference in New Issue