System and user information
User
Display current username (or user when using sudo)
whoami
sudo whoamiShow currently logged in user
whoPermission details for current user
idList users for system
usersDisplay information about system user
finger <username>Show login history for system (or system reboot history)
last
last rebootOperating System
Display the Unix system type being used
uname -aDisplay the processor architecture (-p) or machine hardware (-m). (Examples: Processor arm, i386 / Hardware arm64, x86_64)
uname -p
uname -mDisplay system OS information (Linux)
cat /etc/os-releaseShow distribution specific version information (Linux)
cat /etc/lsb-releaseDisplay basic system OS information or more detailed system config (macOS)
sw_vers
system_profiler SPSoftwareDataTypeCommand Info
Search system commands and display short description
whatis <command>Show location of command for current user path config
which <command>Show all locations for command
whereis <command>Uptime
Display system uptime, memory, who is logged in and what they are doing
wSystem uptime statistics
uptimeHostname
Display the machine short hostname
hostnameDisplay the machine fully qualified hostname
hostname -fProcesses
Display real time information about process
topDisplay detailed real time information about the system
htopShow list of running processes
ps aux | lessMemory
Show memory usage (in megabytes)
free -mNetwork
Network settings including computer IP
ifconfigLocal machine IP
ipconfig getifaddr en0Show smb info for network volumes
smbutil statshares -aTerminal
Output key / value pairs of current environment variables
envOutput current terminal settings
stty -aLog Files
Log files location
/var/logSystem Mail
System mail messages for users
/var/mail/<username>Show mail messages
cat /var/mail/<username>Empty mail messages (via truncate operator >)
> /var/mail/<username>Empty mail messages (alternative command)
cat /dev/null > /var/mail/<username>Last updated