debian kill open port 1

debian kill open port

kill -9 $(sudo lsof -t -i:8080)

Here is what the above code is Doing:
1. We’re using the sudo command to run the lsof command as the root user.
2. The -t option tells lsof to only print the PID of the process.
3. The -i option tells lsof to only print the PID of the process that is listening on port 8080.
4. The output of the lsof command is piped to the kill command.
5. The -9 option tells kill to send the SIGKILL signal to the process.
6. The output of the lsof command is passed as an argument to the kill command.

Similar Posts