LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

id

displays user and group identity information

TLDR

Show current user info
$ id
copy
Show info for user
$ id [username]
copy
Show only user ID
$ id -u
copy
Show only group ID
$ id -g
copy
Show all group IDs
$ id -G
copy
Show names instead of numbers
$ id -n -u
copy

SYNOPSIS

id [options] [user]

DESCRIPTION

id displays user and group identity information. It shows UID, GID, and supplementary groups for users.The command is useful for verifying permissions and group memberships. It can query any user or the current user by default.

PARAMETERS

USER

Username to query.
-u, --user
Print user ID only.
-g, --group
Print primary group ID.
-G, --groups
Print all group IDs.
-n, --name
Print names instead of IDs.
-r, --real
Print real ID.
--help
Display help information.

INSTALL

sudo apt install coreutils
copy
sudo dnf install coreutils
copy
sudo pacman -S coreutils
copy
sudo apk add coreutils
copy
sudo zypper install coreutils
copy
brew install coreutils
copy
nix profile install nixpkgs#coreutils
copy

CAVEATS

Part of coreutils. Shows cached info at login. Real vs effective ID support.

HISTORY

id is a standard Unix command, part of GNU coreutils on Linux.

SEE ALSO

whoami(1), groups(1), users(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid