• 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 / How To / How To Check Which Process Is Using A Port In Linux

How To Check Which Process Is Using A Port In Linux

By Sourabh / May 16, 2022 Category: How To, Ubuntu

How to check port is open in Linux Ubuntu? Here is the command to check which process is using a port in Linux. On Linux, learn how to check if port is open.

Using lsof command

lsof command is used to list open files. Note that an open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket.) A specific file or all the files in a file system may be selected by path.

$ sudo lsof -i -P -n
$ sudo lsof -i -P -n | grep LISTEN

Using netstat command

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 -ltnp

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
p: display process ID/ Program name

If you want to get information about a specific port, you can use the netstat command using the grep function together.

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

That’s all.

Primary Sidebar

Latest Posts

Downlaod Ubuntu 26.10 Stonking Stingray

How To Shutdown Linux With A 15 Minute Delay And Message

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

Check How Many Users Are Created In Linux Ubuntu

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

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

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