<< Back to posts
Helpful Linux Commands
A list of helpful Linux commands.
Localhost
List processes running on port 5000
lsof -i :5000
GPUs
List processes using Nvidia GPUs
fuser -v /dev/nvidia*
lsof /dev/nvidia*
Real-time GPU memory usage (pretty):
pip install gpustats
gpustat -cp --watch
Real-time GPU memory usage (ugly):
watch -n0.1 nvidia-smi
Memory
Size of every file/folder in the current directory:
du -hs * | sort -hr