Linux / Unix: Find a user’s UID and GID Command

by on January 23, 2014 · 0 comments· LAST UPDATED January 23, 2014

Fig. 01: id command in action

So how do you find a user's UID or GID on Linux, Apple OS X, *BSD and Unix-like operating systems?

The answer is simple use id command. To see a nixcraft user's UID, enter:

 
id -u {user}
id -u nixcraft

Sample outputs:

1000

To see a nixcraft user's GID, enter:

 
id -g {user}
id -g nixcraft

Sample outputs:

1000

See id command man page for more information.

TwitterFacebookGoogle+Found an error/typo on this page? Help us!

Examples and usage: Linux / Unix: id Command Examples

{ 0 comments… add one now }

Leave a Comment

Tagged as: