Last active
January 2, 2019 20:54
-
-
Save trukhinyuri/5036905 to your computer and use it in GitHub Desktop.
Как убить процесс, занимающий порт
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
При активной отладке Glassfish постоянно забываешь, | |
где его запустил и соответственно он висит и занимает необходимый порт. | |
Прибить его можно очень просто. Найдем процесс, который занимает порт: | |
lsof -i tcp:8181 | |
В ответ видим: | |
java 10362 trukhinyuri 320u IPv6 0x618942d79bb700ab 0t0 TCP *:8181 (LISTEN) | |
Мочим гада: kill -9 10362 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lsof -i tcp: 8181 | tail -n 1 |awk '{ print $2 }' | xargs kill -9