System Information - linux
Disk Usage
du
du -hsx * | sort -rh | head -30
# largest 30 folders
df / -h # shows total, available, and used
du folder_name -h --max-depth=0 # This is to get the size of a folder, but for some reason this overestimates relative to the file explorer. Provides a useful idea though.
Commands
| Command | Meaning | Example | Notes |
| du | Disk Usage | ||
| df | Disk Free | ||
| lshw | Linux System Hardware Information | sudo lshw -html > lshw.html | |
| lscpu | Linux CPU Information | lscpu | |
| lsblk | Linux Block Device Information | lsblk -a | |
| lsusb | USB Controllers Information | lsusb -v | |
| lspci | PCI Devices Information | lspci -v | |
| fdisk | Linux File System Information | sudo fdisk -l | This is used to modify file system partitions as well. I think it could be dangerous. |
Process' Commands
| Command | Description | Notes |
| ps -p PID | Get process by PID | If looking at multpile processes by same program, look for one with most uptime |
| ps -p PID -o comm= | Get process name by PID |