System Information

Display system details.

uname -a
uname -r
uname -m
uname -o

Hostname

Show or set hostname.

hostname
sudo hostnamectl set-hostname newhostname
hostnamectl

Uptime

Show system uptime.

uptime
uptime -p
uptime -s

Memory Information

Show memory usage.

free -h
free -m
cat /proc/meminfo
vmstat

CPU Information

Display CPU details.

lscpu
cat /proc/cpuinfo
nproc

Disk Information

List block devices.

lsblk
lsblk -f
blkid

PCI Devices

List PCI hardware.

lspci
lspci -v

USB Devices

List USB devices.

lsusb
lsusb -v

OS Release

Show OS information.

cat /etc/os-release
lsb_release -a

Date and Time

Show current date/time.

date
date +"%Y-%m-%d %H:%M:%S"
timedatectl
cal

Common mistakes / Pitfalls

  • People often copy a command or pattern without adapting placeholders, which can break production workflows unexpectedly.
  • It is easy to forget environment-specific differences, so always verify behavior in your shell, runtime, or API gateway before shipping.
  • Many errors come from skipping small validation steps, so test with realistic sample input before relying on the result.
Last updated: February 2026