This page is a reference for useful command-line tools and one-liners for server management, grouped by category.
lsof -i tcp:8080Finds the process ID (PID) that is holding onto a specific network port.
netstat -pluntShows which programs are actively listening on TCP and UDP ports.
iptables -A INPUT -s 1.2.3.4/32 -j DROPBans a given IP address from accessing your server using the firewall.
fuser -k filenameKills a process that is currently locking a file.
python -m SimpleHTTPServerStarts a simple web server in the current directory on port 8000.