0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Linux ユーザー 確認

Posted at

Linuxユーザー確認

ログインユーザー

who

特定ユーザーの詳細

cat /etc/passwd |grep tomcat

tomcat:x :1002:1002::/opt/tomcat:/bin/false

|ユーザー名|パスワード(x表示)|ユーザーID|グループID|任意コメント|ホームディレクトリ|シェルの場所|
|----|----|----|----|----|----|----|----|----|----|----|----|----|
|tomcat|x|1002|1002||/opt/tomcat|/bin/false|

ユーザー 詳細一覧

cat /etc/passwd

ユーザー名 一覧

cut -d: -f1 /etc/passwd

cutコマンド

オプション 備考
-d --delimiter 項目名を区切る際に、区切り文字を使用。-fオプションと組み合わせて使用する。
-f --fields 必要な項目を項目数で指定する

参考
https://eng-entrance.com/linux-command-cut

参考
https://www.sejuku.net/blog/54497

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?