Linux find and kill a process by port or name
Bash Dasun Kalupahana 85 views
ss -tulpn | grep :8000 # who is using port 8000
lsof -i :8000 # same, with lsof
kill <PID> # graceful stop
kill -9 <PID> # force stop
pkill -f "php artisan serve" # kill by command name
Finds what is listening on a port and stops it. Try a normal kill first and only use kill -9 if the process won’t stop.
Learn more on the blog
MySQL
Upgrade MySQL 8.0 to 8.4: What Breaks and How to Check
MySQL 8.0 reached end of life in April 2026, which means no...
7 min read
Linux
AWK gsub() Examples: Find and Replace Text in Linux
gsub() is AWK's find-and-replace. It replaces every match of a pattern in...
5 min read
Linux
AWK Remove Duplicates: Lines, Columns and CSV Rows
The shortest way to remove duplicate lines from a file in Linux...
5 min read