Enhancing Skills

Check what is using a port on linux

Assume we are looking for port 443. Use the “netstat” command on Linux to see which processes are using port 443. Here’s how to do it:

  • Open a terminal window on your Linux machine.
  • Run the following command to display all network connections and listening ports:
sudo netstat -tulpn | grep 443

This will show a list of all active network connections and the corresponding processes that are using them.

  • Look for the line that shows “443” in the “Local Address” column. This indicates that a process is using port 443.
  • Check the corresponding process ID (PID) in the “PID/Program name” column.
  • Run the following command to get more information about the process using the PID:
sudo ps -ef | grep <PID>

Replace “<PID>” with the actual PID you found in step 4.

This command will show you the name and other details of the process that is using port 443.

Once you know which process is using port 443, you can decide whether to stop or reconfigure the process, or to use a different port for your own purposes.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Find stuff?

Post Calendar

March 2024
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Categories