Linux Process & Port Management
Source: raw/linux/bash command.md.
View processes
ps aux # detailed list
ps -ef # another common format
ps -eo pid,ppid,cmd # custom columnsFind a specific process
ps aux | grep "process_name"
pgrep -l "process_name" # PIDs + names
pidof "process_name" # PID(s)Check open ports
sudo netstat -tulpn # all listening ports + process info
sudo netstat -tulpn | grep LISTEN
sudo ss -tulpn # modern alternative
sudo ss -tulpn | grep :8080
sudo lsof -i :8080Terminate
kill PID # SIGTERM (graceful, == kill -15)
kill -9 PID # SIGKILL (force)
pkill process_name
pkill -f "full_command"
killall process_nameOpen questions
systemctl/ service management (see docker-cli-basics).top/htop/nice/renicefor CPU priority.