Users and Their Environment

logname

Print your login name

whoami

Print your current, effective username

id

Print the user ID and group membership of a user

who

List logged-in users, long output

users

List logged-in users, short output

finger

Print information about users

last

Determine when someone last logged in

printenv

Print your environment

Who are you? Only the system knows for sure. This grab-bag of programs tells you all about users: their names, login times, and properties of their environment.

Get Linux Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.