Kill processes by port number with GUI authentication for Ubuntu and Linux distributions
A powerful, user-friendly GTK3-based GUI application designed for Linux system administrators, developers, and power users who need to quickly identify and terminate processes running on specific network ports. Built specifically for Ubuntu 24.04 with cross-compatibility for most Linux distributions.
- Instant Port Scanning: Enter any port number (80, 3000, 8080, etc.) to discover running processes
- Multi-Process Detection: Identifies all processes using a specific network port
- Real-time Process Information: Shows PID, command name, user ownership, and connection details
- GUI Authentication Prompts: Uses PolicyKit (
pkexec
) for secure privilege escalation - Smart Permission Handling: Automatically detects when sudo privileges are required
- User-Friendly Dialogs: Clear confirmation dialogs before process termination
- Graceful Termination: Attempts SIGTERM first, then SIGKILL if necessary
- Bulk Process Management: Handle multiple processes on the same port
- Safe Operation: Confirmation dialogs prevent accidental process killing
- Status Feedback: Real-time success/error messages and operation status
- Clean GTK3 Interface: Native Linux desktop integration
- Custom Application Icon: Professional port/network themed icon
- Desktop Integration: Installable via applications menu
- Responsive Design: Scalable interface for different screen sizes
Main interface showing port input and process discovery
Process information display and termination controls
- Operating System: Ubuntu 24.04+ or any modern Linux distribution
- Python: 3.12+ (pre-installed on Ubuntu 24)
- GUI Framework: GTK 3.0 with PyGObject bindings
- System Tools:
lsof
,pkexec
(included by default)
# Clone the repository
git clone https://github.com/iamsaad640/port-killer-gui-linux.git
cd port-killer-gui-linux
# Install to applications menu
./install.sh
# Make executable
chmod +x kill_port_gui.py run.sh install.sh
# Run directly
./run.sh
# Or with Python
python3 kill_port_gui.py
- Launch Application: Find "Port Killer" in your applications menu or run
./run.sh
- Enter Port Number: Type the port number (e.g., 3000, 8080, 80)
- Discover Processes: Click "Find Process" or press Enter
- Review Information: Check process details in the information panel
- Terminate Process: Click "Kill Process" and confirm the action
- Authentication: Enter your password if prompted for elevated privileges
- Kill Development Servers: Instantly terminate React (3000), Next.js (3000), Vue (8080), or Angular dev servers
- Stop Backend Services: Kill Express.js, Flask, Django, or Node.js applications
- Docker Container Cleanup: Terminate processes from Docker containers using host ports
- Web Server Management: Stop Apache (80, 443), Nginx, or other web servers
- Database Cleanup: Terminate MySQL (3306), PostgreSQL (5432), MongoDB (27017) processes
- Network Service Control: Manage SSH (22), FTP (21), Telnet (23) connections
- Port Conflict Resolution: Quickly free up ports blocked by crashed applications
- Testing Environment Cleanup: Clear development/staging server processes
- Microservices Management: Control individual service instances by port
- PolicyKit Integration: Uses
pkexec
for secure GUI authentication - Privilege Escalation: Automatically detects when administrator rights are needed
- User Context Awareness: Direct termination for own processes, authentication for others
- Confirmation Dialogs: Prevents accidental process termination
- Process Information Display: Shows detailed process info before killing
- Graceful Termination: SIGTERM β SIGKILL progression for safe cleanup
- Error Handling: Comprehensive error reporting and recovery
Issue | Solution |
---|---|
lsof command not found |
sudo apt install lsof |
Authentication fails | sudo apt install policykit-1 |
No GUI display | Ensure graphical environment with GTK support |
Permission denied | Run with proper user permissions or use sudo |
Port not found | Verify port number and check if process is actually running |
- Minimum RAM: 256MB
- Disk Space: 50MB
- Display: X11 or Wayland with GTK 3.0 support
- Network Tools: lsof, netstat (usually pre-installed)
- Frontend: GTK 3.0 with PyGObject bindings
- Backend: Python 3.12+ with subprocess management
- Authentication: PolicyKit (
pkexec
) for secure privilege escalation - Process Discovery:
lsof
command-line utility integration - Signal Handling: POSIX signals (SIGTERM, SIGKILL)
# Core Dependencies
gi (PyGObject) # GTK 3.0 bindings
subprocess # Process management
os # System operations
signal # POSIX signal handling
# System Tools
lsof # Process discovery
pkexec # GUI authentication
We welcome contributions! Here's how you can help:
- π Bug Reports: Report issues via GitHub Issues
- β¨ Feature Requests: Suggest new functionality
- π§ Code Contributions: Submit PRs for improvements
- π Documentation: Improve README and code comments
- π Translations: Add support for other languages
git clone https://github.com/iamsaad640/port-killer-gui-linux.git
cd port-killer-gui-linux
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt # If requirements file exists
- Startup Time: <2 seconds on modern hardware
- Memory Usage: ~15-25MB RAM
- CPU Impact: Minimal (<1% during scanning)
- Port Scan Speed: Instant for single ports
- Multi-Process Handling: Concurrent termination support
Tool | GUI | Cross-Platform | Authentication | License |
---|---|---|---|---|
Port Killer GUI | β GTK3 | Linux/Unix | PolicyKit | MIT |
kill -9 $(lsof -t -i:PORT) |
β CLI | Unix/Linux | sudo | Built-in |
fuser -k PORT/tcp |
β CLI | Linux | sudo | Built-in |
Task Manager (Windows) | β Native | Windows Only | UAC | Proprietary |
MIT License
Copyright (c) 2025 Port Killer GUI Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- cross-port-killer - Cross-platform CLI port killer
- killport - Command-line port process terminator
- tcpkiller - Windows/macOS GUI port killer
- naabu - Fast port scanner for reconnaissance
β Star this repository if it helped you manage network processes efficiently! β
Report Bug β’ Request Feature β’ Contribute β’ Documentation
Built with β€οΈ for the Linux community