Hardware Flashcards
How do you view CPU info?
cat /proc/cpuinfo
What is the command to see RAM utilisation?
free
-h human readable
What is the command to get info about the motherboard, BIOS, etc.
dmidecode
*must run with root priveleges
What is the command to view block devices (i.e hard disks) attached to the system?
lslbk
What is the command to get free space on the system?
df
-h output human readable format
What is the naming convention for hard drives?
/dev/{xxx} | hard drive name /dev/{xxxn} | hard drive partition i.e /dev/sda i.e /dev/sda1 *first partition i.e /dev/sdb1 *second hard drive, first partition
What is the command to interactively show statistics on running processes, cpu and ram usage?
top
What is the command to list statistics on running processes, cpu and ram usage?
ps
- u specify username -e show all
- H process hierachy -x show command being run
How do you kill a process using process ID?
kill >PID<
kill -15 >PID<
kill -SIGTERM >PID
How do you kill a process using its name?
pkill
How do you search for the ID of a process?
pgrep
How do you kill a non-responding process?
kill -9
kill -SIGKILL
How do you view the kernel ring buffer?
dmesg
- w real time -H colour formatting
- not stored on disk as updates constantly