≡ Menu

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

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.

Tweet itFacebook itGoogle+ itFound an error/typo on this page?

Examples and usage: Linux / Unix: id Command Examples

{ 0 comments… add one }

Leave a Comment