Hardware & Resources

Commands

inxi

(Not on all systems) Comprehensive hardware and system information.

lshw

Hardware details

uname -m

Machine architecture

uname -v

Kernel version

uname -o

OS

uname -i

Hardware platform

lscpu

CPU

cat /proc/cpuinfo

CPU

uname -p

Processor type

cat /proc/meminfo

Memory

free -m

Displays free and used memory in megabytes.

vmstat

Virtual memory

df -h

Disk space usage

df -h

Disk space usage in human-readable format.

ncdu

Disk usage analyzer

lsblk

List block devices

dmidecode

Info from SMBIOS/DMI tables (motherboard, BIOS, memory, etc.) (requires root privileges).

fdisk -l

Lists disk partitions (requires root privileges).

lspci

Lists all PCI devices.

lsusb

Displays USB devices.

ip addr

Shows network interface information and IP addresses.

du

Estimate file and directory space usage.

Solaris

psrinfo -v

Displays processor information.

modinfo -c

Lists all the kernel modules.

File Locations

Note: /proc and /sys provide real-time data direct from the kernel and can't be modified by a user. Access to certain files within these directories may require sudo privileges.

/proc

/proc/cpuinfo

Information about CPUs.

/proc/meminfo

Memory-related information.

/proc/loadavg

Load average statistics.

/proc/uptime

System uptime.

/proc/version

Kernel version.

/proc/net/

Network-related information.

/proc/mounts

Mounted filesystems.

/proc/devices

Available devices.

/proc/modules

Loaded kernel modules.

/proc/interrupts

IRQ usage.

/sys

/sys/class/hwmon/

Hardware monitoring sensors.

/sys/block/

Block devices (e.g., hard drives).

/sys/class/net/

Network interfaces.

/dev

Contains device files representing hardware devices on the system. While these files can be read from and written to, their contents are managed directly by the kernel and cannot be arbitrarily modified by users.

dmesg

The kernel message buffer, viewable using the dmesg command, contains logs of system events and hardware messages. It's a read-only view of kernel activity and cannot be edited directly.

Last updated

Was this helpful?