• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Ubuntu / How To Check Which Process Is Using A Port In Linux

How To Check Which Process Is Using A Port In Linux

By Sourabh / August 13, 2022 Category: How To, Ubuntu

How to check which process is using a port in Linux Ubuntu? Commands to find which process is using a port or find process running on port in Ubuntu Linux

Using netstat

The netstat command is a member of the net-tools package. netstat (network statistics) command is used to display information about network.

If the command is not installed upon the system, install it using the command $ sudo apt-get install net-tools and once installed use it to check port and process information.

$ sudo netstat -ltnup

The netstat command uses the following command parameters to diplay the related netwrok information:

  • l: display only listening sockets
  • t: display tcp connection
  • n: display addresses in a numerical form
  • u: show UDP connections
  • p: display process ID/ Program name

Find Which Process Is Running On A Specific Port Number

Run the following command to find which process is running on specific port number. For example the following command will display which process is running on port number 80 on the system:

$ sudo netstat -ltnp | grep -w ':80'

Using the lsof Command

You can use the lsof (List of Open Files) command to listen all the open files on your Linux Ubuntu system. If it is not installed, run the command given below to install lsof:

$ sudo apt install lsof

Once installed, This command will list all processes using TCP port number 80 on teh system:

$ sudo lsof -i :80

NOTE: On Linux Ubuntu systems, only the root user or the process owner can get/see the detailed information of the process.

Using fusrer

The fuser utility displays which processes are using named files, sockets, or file systems. It’s included in the psmisc package and preinstalled on many modern Linux distributions by default.

It is most widely used to get the information of the process running on a specific port.

For example the command given bwlow will show the PID of the processing listening TCP port 22:

$ sudo fuser 22/tcp

If you want more details about the process run the command with the “-v” option. It show verbose output.

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap