Shell
USER
Login name of the current user.
Ubuntu
Debian
Arch
Fedora
CentOS
SUSE
Alpine
macOS
FreeBSD
Verified: 2026-05-12
Syntax
$echo $USER
Examples
$echo $USER
Typical use cases
?
Standard usage
USER --help
Note
Do not confuse with effective privileges; use id -u for UID checks.
Export