System Core & Identification
uname -a # Fetch kernel version, architecture, hostname, and CPU compatibility
awk 'NR==1' /etc/issue # Display current OS distribution and core release tag
cat /proc/version # Show detailed OS compilation flags and build metadata
hostnamectl # View hostname, chassis type, OS, and kernel info (systemd systems only)
echo $HOSTNAME # Alternative for checking hostname without systemd
PCI/USB Devices & Loaded Kernel Modules
lspci -tv # Tree-formatted list of all connected PCI devices
lspci -nn # Raw numeric vendor/device IDs for troubleshooting
lsusb -t # Tree-based USB device topology with driver hints
lsusb -v # Verbose USB device details including power draw
lsmod # Show all dynamically loaded kernel modules with dependencies
modinfo <module_name> # Inspect metadata for a specific loaded/unloaded module
Memory & Swap Resources
free -h # Human-readable total/used/free memory and swap
free -g # Memory/swap usage in gigabytes
awk '/MemTotal/ {print $2, $3}' /proc/meminfo # Extract total system memory
awk '/MemAvailable/ {print $2, $3}' /proc/meminfo # Extract memory available for new processes
uptime # Display system uptime, active users, and 1/5/15-minute load averages
cat /proc/loadavg # Raw load average data plus running/total processes and last PID
Disk & Storage Subsystem
mount | column -t # Cleanly formatted list of mounted filesystems
findmnt # Alternative tree-based mount listing (systemd systems only)
fdisk -l # List all physical disks and partitions (requires root)
lsblk # Non-root disk/partition/tree topology with sizes
swapon -s # List active swap partitions/files and their priorities
swapon --show # Human-readable swap information
ls -l /dev/disk/by-id/ # Map disk devices to vendor/model serial numbers
dmesg | grep -i 'sd\|nvme' # Check boot-time storage device detection logs
Network Configuration & Monitoring
ip addr show # Modern alternative to ifconfig for interface IP/MAC info
ip link set <iface> up/down # Toggle network interface state (requires root)
route -n # Numeric routing table (no DNS resolution)
ip route show # Modern alternative routing table view
netstat -lntup # All listening TCP/UDP ports with associated PIDs (root for full PIDs)
ss -lntup # Faster modern alternative to netstat
ss -antup # Show all established/transitional connections
netstat -s # Detailed network protocol statistics
ss -s # Quick network connection summary
Process & Service Activity
ps aux # BSD-style all-process listing with user/memory/CPU stats
ps -eo pid,ppid,cmd,%cpu,%mem # Custom formatted process output
htop # Interactive, color-coded process monitor (install if missing)
top # Built-in real-time process monitor
systemctl list-units --type=service --all # List all systemd services (active/inactive/failed)
systemctl list-unit-files --type=service # List all installed systemd service files and enable status
chkconfig --list 2>/dev/null || true # Legacy SysVinit service listing (if applicable)
User & Group Management
w # Detailed active user session info with terminal/IP/load
who # Simplified active user list
id <username> # UID/GID, primary/secondary groups for a specific user
last # Recent login/logout history (including reboots)
lastb # Failed login attempts (requires root)
cut -d: -f1,3 /etc/passwd # List all system users with their UIDs
getent passwd # Alternative user list (works with LDAP/NIS too)
cut -d: -f1,3 /etc/group # List all system groups with their GIDs
getent group # Alternative group list (supports directory services)
crontab -l # View current user's scheduled cron jobs
crontab -u <username> -l # View another user's cron jobs (requires root)
Installed Software & Packages
rpm -qa # List all installed RPM packages (RHEL/CentOS/Fedora/SUSE)
dpkg -l # List all installed DEB packages (Debian/Ubuntu/Mint)
dnf list installed # Modern RHEL/Fedora installed package list
apt list --installed # Modern Debian/Ubuntu installed package list
pacman -Q # List all installed Arch Linux packages
Extended Hardware Audit Tools
dmidecode # Dump full DMI/SMBIOS hardware info (BIOS, CPU, RAM, serials, etc.)
dmidecode -t processor # Filter DMI output to only CPU details
dmidecode -t memory # Filter DMI output to only RAM details
dmidecode -s system-serial-number # Extract system motherboard serial number directly
lshw # Hardware lister (install first; graphical version: lshw-gtk)
lshw -short # Concise summary of key hardware components
iostat -x # Extended disk I/O statistics (install sysstat package first)
vmstat 5 # Virtual memory and system stats updated every 5 seconds
cat /proc/interrupts # List hardware interrupt requests (IRQs) per device
cat /proc/cpuinfo # Low-level CPU topology and feature flags (detailed breakdown below)
cat /proc/meminfo # Low-level memory subsystem details (field reference below)
Solaris/SPARC-Only Notes
A few legacy or architecture-specific tools are included for reference:
isainfo -v # Show kernel bitness and supported instruction sets
prtdiag -v # Full Solaris system diagnostic output
showrev -p # List applied Solaris patches
prtconf -v # Solaris device tree and OBP version
/proc/cpuinfo Deep Dive
The /proc/cpuinfo pseudo-file exposes CPU topology and capabilities. Below are common filtering commands and field explanations:
# Total logical cores = physical CPU count × cores per CPU × (2 if hyper-threading is enabled)
# Count physical CPU packages
awk '/physical id/ {print $4}' /proc/cpuinfo | sort -u | wc -l
# Count cores per physical CPU
awk '/cpu cores/ {print $4}' /proc/cpuinfo | uniq
# Count logical processing units
awk '/processor/ {print $3}' /proc/cpuinfo | wc -l
# Check if hyper-threading is active
lscpu | grep 'Thread(s) per core' # Modern, simpler check
| Field | Description |
|---|---|
processor |
Unique ID for each logical processing unit (core/hyper-thread) |
vendor_id |
CPU manufacturer (e.g., GenuineIntel, AuthenticAMD) |
cpu family |
Numeric product family identifier |
model |
Numeric generation identifier within the family |
model name |
Human-readable CPU model and nominal clock speed |
stepping |
Manufacturing revision number |
cpu MHz |
Current operating clock speed (may vary with power management) |
cache size |
Total L2/L3 cache size (varies by CPU) |
physical id |
Unique ID for each physical CPU package |
siblings |
Total logical processing units per physical CPU package |
core id |
Unique ID for each physical core within its package |
cpu cores |
Total physical cores per package |
flags |
List of supported CPU features (e.g., sse4_2, avx2, vmx/svm for VT) |
bogomips |
Kernel-calibrated rough CPU speed estimate (MIPS) |
/proc/meminfo Field Reference
The /proc/meminfo pseudo-file providse granular memory subsystem metrics. Key fields include:
cat /proc/meminfo
| Field | Description |
|---|---|
MemTotal |
Total physical RAM available to the kernel |
MemFree |
RAM completely unused by any process or cache |
MemAvailable |
Estimated RAM available for new processes (includes reclaimable caches) |
Buffers |
Temporary storage for raw disk I/O blocks |
Cached |
File-backed memory cache for frequent reads |
SwapTotal |
Total available swap space (partitions + files) |
SwapFree |
Unused swap space |
Active |
RAM recently accessed by processes (less likely to be reclaimed) |
Inactive |
RAM not recently accessed (primary target for cache reclamation) |
Dirty |
RAM pages modified but not yet written to disk |
Slab |
Kernel-internal data structure cache |
PageTables |
RAM used to manage virtual-to-physical memory mappings |
HugePages_Total |
Total pre-allocated huge pages (for memory-intensive workloads) |
Hugepagesize |
Size of each huge page (typically 2MB or 1GB) |