Killport
Simple bash script to kill a process which uses the specified port
Install / Use
/learn @xtrasimplicity/KillportREADME
killport
Simple bash script to kill a process which uses the specified port.
Installation
Simply make a directory in which to store the script, i.e. /opt/scripts/killport, clone this repository therein, set the script to executable, and add this path your $PATH environment variable, as follows:
mkdir -p /opt/scripts/killport && cd /opt/scripts/killport
git clone https://github.com/xtrasimplicity/killport.git .
chmod +x killport
echo 'export PATH="$PATH:/opt/scripts/killport"' >> ~/.bashrc
source ~/.bashrc
Usage
Simply run killport as follows:
killport PORT_NUMBER
i.e. killport 3000
By default, killport sends each process a SIGTERM signal, allowing the process to gracefully terminate.
If you want to forcefully terminate the process, you can pass the -f option to have killport send a SIGKILL signal.
i.e. killport -f 3000
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Related Skills
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
50PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
