Linux Commands Flashcards
uname -a
Display Linux system information
uname -r
Display kernel release information
cat /etc/redhat-release
Show which version of Red Hat installed
lsb_release -a
Show which version of Ubuntu installed
uptime
Show how long the system has been running + load
hostname
Show system host name
hostname -I
Display all local IP addresses of the host
last reboot
Show system reboot history
date
Show the current date and time
cal
Show this month’s calendar
w
Display who is online
whoami
Who you are logged in as
dmesg
Display messages in kernel ring buffer
cat /proc/cpuinfo
Display CPU information
cat /proc/meminfo
Display memory information
free -h
Display free and used memory ( -h for human readable,
-m for MB, -g for GB.)
lspci -tv
Display PCI devices
lsusb -tv
Display USB devices
dmidecode
Display DMI/SMBIOS (hardware info) from the BIOS
hdparm -i /dev/sda
Show info about disk sda
hdparm -tT /dev/sda
Perform a read speed test on disk sda
badblocks -s /dev/sda
Test for unreadable blocks on disk sda
lshw
Display information about CPU, memory, storage, and
network interfaces
lsblk
Display information about all storage devices