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

CommandMeaningExampleNotes
duDisk Usage
dfDisk Free
lshwLinux System Hardware Informationsudo lshw -html > lshw.html
lscpuLinux CPU Informationlscpu
lsblkLinux Block Device Informationlsblk -a
lsusbUSB Controllers Informationlsusb -v
lspciPCI Devices Informationlspci -v
fdiskLinux File System Informationsudo fdisk -lThis is used to modify file system partitions as well. I think it could be dangerous.

Process' Commands

CommandDescriptionNotes
ps -p PIDGet process by PIDIf looking at multpile processes by same program, look for one with most uptime
ps -p PID -o comm=Get process name by PID