U
U
Urukhayy2016-10-29 16:57:56
System administration
Urukhayy, 2016-10-29 16:57:56

How to close a process and release the ports it occupies?

There is node.js listening on a port. When the process is closed (killall *.js), the port remains to be listening. How to release it along with the closing of the process?
Is there any way to restart the node.js process without closing and releasing the port?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-10-29
@Urukhayy

www.thegeekstuff.com/2012/08/lsof-command-examples
lsof -i:8000
www.cyberciti.biz/faq/unix-kill-command-examples
kill -15 `lsof -t -i:8000`
kill -9 `lsof -t -i:8000`

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question