netstat -tulnap
shows me what ports are in use. How to free up a port in Linux?
Linux – Freeing up a TCP/IP port
linuxnetworkingporttcp
Related Question
- Sockets – the difference between a port and a socket
- C++ – How to profile C++ code running on Linux
- Macos – Who is listening on a given TCP port on Mac OS X
- Linux – How to use grep to show just filenames on Linux
- Linux – How to kill a process running on particular port in Linux
- Windows – Command line for looking at specific port
- Java – How to configure port for a Spring Boot application
Best Solution
As the others have said, you'll have to kill all processes that are listening on that port. The easiest way to do that would be to use the fuser(1) command. For example, to see all of the processes listening for http requests on port 80 (run as root or use sudo):
If you want to kill them, then just add the -k option.