If you want to find out what process has a port open, try this: lsof -i :5955 You can also just kill the process that has the port open. For example, if you created a socket, bound it to port 0.0.0.0:5955, and called listen, close that same socket. However you opened the port, you close it in the same way. Again depending on how you opened the port, this may not matter. I would only do the following if the previous didnt work sudo kill -9 PID Kill the process which is currently using the port using its PID kill PIDĪnd then check to see if the port closed. To find the process try: sudo lsof -i :portNumber Kill the process which is currently using the port using its PID sudo kill -9 PID 1:įind out the process ID (PID) which is occupying the port number (e.g., 5955) you would like to free sudo lsof -i :5955 How do i close this port after I am done? and also which command can show me if port open or closed? I opened port #5955 from a java class to comunicate from a client.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |