≡ 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.

Sysadmin because even developers need heroes!!!

Share this tutorial on:

Examples and usage: Linux / Unix: id Command Examples

{ 0 comments… add one }
Security: Are you a robot or human?
You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: