LoginSignup
17
23

More than 5 years have passed since last update.

CentOSでグループの一覧を表示する

Last updated at Posted at 2014-12-07

CentOSでグループ一覧を確認したいことあります。

グループ一覧を表示

catコマンドで/etc/groupを表示すると、グループの一覧を確認できます。

グループ一覧を表示
cat /etc/group

略

pugiemonn:x:500:

pugiemonnグループを表示できました。

getentコマンドを利用して、グループ一覧を表示

コメントをいただきました。getentコマンドを使用しても、グループ一覧を表示できます。

getentコマンドでグループ一覧を表示
getent group

グループ一覧をグループ名で絞り込むパターンです。

getentコマンドでグループ名で絞り込み表示
getent group group_name 

例、mysqlグループを検索

グループ名で絞り込み表示
getent group mysql
mysql:x:27:

関連:ユーザーの一覧を表示

CentOSでユーザーの一覧を確認する
http://qiita.com/pugiemonn/items/aca73990736f26c9cded

17
23
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
23