How can I find the process id and stop the process that is running on port 8080 on a Mac?
On Ubuntu this works:
and I can find the process and run:
kill -9 pid
ps -aux didn't seem to work, how can I do this on Mac OS X Lion?
For historical reasons,
I don't have an ubuntu box handy to test, but according to the man page,
If you wish to find and kill all processes which conform to a string, you can also use the following on a Mac OSX:
Basically what this will do is that it will find (grep) all the processes currently running on your system matching the , AWK gets the PID, which in the PS command is the second column and the last one takes the arguments from AWK and kills the processes.
Use SUDO, only if the current user does not have some rights to kill a process and if you have SUDO access on your system.
To get what PID has port 8080 in use:
The fields map out to:
I started up
and indeed, PID 27999 corresponds to the PID of the