$ Linux Commands

System Info — Hardware, OS, and resource information

date System Info

Display or set the system date and time

date [OPTIONS] [+FORMAT]
date
date +"%Y-%m-%d"
date +"%H:%M:%S"
df System Info

Report disk space usage of filesystems

df [OPTIONS] [FILE...]
df -h
df -h /
df -T
-h human-readable sizes
-T show filesystem type
-i show inode info instead
free System Info

Display amount of free and used memory

free [OPTIONS]
free -h
free -m
-h human-readable
-m display in megabytes
-g display in gigabytes
-s N repeat every N seconds
hostname System Info

Show or set the system hostname

hostname [OPTIONS] [NAME]
hostname
hostname -I
hostname -f
-I all IP addresses
-f FQDN (fully qualified domain name)
lsblk System Info

List information about block devices

lsblk [OPTIONS]
lsblk
lsblk -f
-f show filesystem info
-o specify output columns
lscpu System Info

Display information about the CPU architecture

lscpu
lscpu
uname System Info

Print system information

uname [OPTIONS]
uname -a
uname -r
uname -m
-a all information
-r kernel release
-m machine hardware name
-n hostname
uptime System Info

Show how long the system has been running

uptime
uptime

Shows current time, uptime duration, number of logged-in users, and load averages.