English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux groupmodコマンド

Linux コマンド全書

Linux groupmodコマンドは、グループの識別コードや名前を変更するために使用されます。

グループの識別コードや名前を変更する場合、groupmodコマンドを使用してこの作業を行うことができます。

構文

groupmod [-g <グループ識別コード> <-o>][-n <新しいグループ名>][グループ名]

パラメータ

  • -g <グループ識別コード>  使用したいグループ識別コードを設定します。
  • -o  グループ識別コードの再利用。
  • -n <新しいグループ名>  使用したいグループ名を設定します。

オンラインサンプル

グループ名の変更

[[email protected] ~]# groupadd linuxso 
[[email protected] ~]# tail -1 /etc/group 
linuxso:x:500: 
[[email protected] ~]# tail -1 /etc/group 
linuxso:x:500: 
[[email protected] ~]# groupmod -n linux linuxso 
[[email protected] ~]# tail -1 /etc/group 
linux:x:500:

Linux コマンド全書