Skip to content

How to check for used and available ports with netstat

A quick note about checking ports with Netstat. This worked for me within Ubuntu.

  1. When Netstat does not work, run the following command:

    # Open your terminal application
    sudo apt-get update
    sudo apt install net-tools
  2. Get a detailed list of all TCP and UDP connections, listening ports, and the processes using them, along with their numerical addresses and port numbers
    Section titled “Get a detailed list of all TCP and UDP connections, listening ports, and the processes using them, along with their numerical addresses and port numbers”

    Run the following command:

    # Open your terminal application
    sudo netstat -tulpen

Now you can check in the list whether a port is in use or not.

    No comments found for this note.

    Join the discussion for this note on Github. Comments appear on this page instantly.

     Copyright 2021-2026 Fiction Becomes Fact