How To Kill A Process That Is A Using Port On MacOS - Kevin Sookocheff
Có thể bạn quan tâm
Every so often I get stuck with a running process that’s using a specific port, preventing me from running some new application that uses the same port. Then I’m left Googling for solutions or rebooting the machine to make progress. But not any more! I’m recording the solution for my future self (and of course for you, dear reader).
> sudo lsof -i :<PortNumber> # returns list of processes using the port, with PID > kill -9 <PID> # kill the specific pidFor example, you can find out what’s running on port number 8080 by running the command:
❯ sudo lsof -i :8080 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 50693 kevinsookocheff 369u IPv6 0x861ee023f0aa0b29 0t0 TCP *:http-alt (LISTEN)lsof returns the PID of the running process that uses the suspect port. You can terminate that process with the kill command:
❯ kill -9 50693And voilà! The port is free once more!
Từ khóa » Http-alt Lsof
-
Understanding What Lsof Socket/port Aliases Refer To - Mark Needham
-
Find Out Which Process Listens On Which Port | Picostitch
-
Linux – Which Application Is Using Port 8080
-
Which Process Uses Http-proxy 8080 - Unix & Linux Stack Exchange
-
Lsof Port 3000 Code Example
-
How To Kill A Process Running On Particular Port In Linux?
-
How Do I Extract The PID From The Output Of `lsof -i:8080`? - Ask Ubuntu
-
Finding A Process Using A Specific Network Port With The Lsof Command
-
Using Lsof To Determine Which Processes Are Listening On TCP Or ...
-
Check Open And Listening Ports On Linux Using Netstat And Ss
-
Inbound Connections Attributed To Wrong Process #1849 - GitHub
-
Find Process Listening At Port 8080 On Mac OS X - Gists · GitHub
-
Find And Kill A Process On A Port | Jake Trent