Linux: Find Out What Is Using TCP Port 80 (2024)

How do I find out what is listing or using tcp port number 80 on Linux based systems using command line options?

You can use any one of the following command to find out what is using tcp or udp port number 80 on Linux operating systems:

nixCraft: Privacy First, Reader Supported

  • nixCraft is a one-person operation. I create all the content myself, with no help from AI or ML. I keep the content accurate and up-to-date.
  • Your privacy is my top priority. I don’t track you, show you ads, or spam you with emails. Just pure content in the true spirit of Linux and FLOSS.
  • Fast and clean browsing experience. nixCraft is designed to be fast and easy to use. You won’t have to deal with pop-ups, ads, cookie banners, or other distractions.
  • Support independent content creators. nixCraft is a labor of love, and it’s only possible thanks to the support of our readers. If you enjoy the content, please support us on Patreon or share this page on social media or your blog. Every bit helps.
Join Patreon
  1. netstat – a command-line tool that displays network connections, routing tables, and a number of network interface statistics.
  2. Tutorial details
    Difficulty level Easy
    Root privileges No
    Requirements None
    Est. reading time 3 minutes
  3. fuser – a command line tool to identify processes using files or sockets.
  4. lsof – a command line tool to list open files under Linux / UNIX to report a list of all open files and the processes that opened them.
  5. /proc/$pid/ file system – Under Linux /proc includes a directory for each running process (including kernel processes) at /proc/PID, containing information about that process, notably including the processes name that opened port.

Examples

Open a terminal and then type the following command as root user:

netstat command find out what is using port 80

Type the following command
# netstat -tulpn | grep :80
OR pass the –color option to grep command as follows:
# netstat -tulpn | grep --color :80
Sample outputs:

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1215/nginx

Where,

  1. 0 0.0.0.0:80 – Source IP:Port
  2. 1215/nginx – PID/Process name

The tcp port 80 is opened and used by nginx web server. Type the following command to find out more about nginx:

whatis nginxwhereis nginx

Note: You may need to install lsof and fuser command.

Use /proc/$pid/exec file find out what is using port 80

First, find out the processes PID that opened tcp port 90, enter:
# fuser 80/tcp
Sample outputs:

80/tcp: 12161 21776 25250 25393

Finally, find out process name associated with PID # 3813, enter:
# ls -l /proc/12161/exe
Sample outputs:

lrwxrwxrwx. 1 root root 0 Aug 9 13:28 /proc/12161/exe -> /usr/sbin/lighttpd

Find out more about lighttpd:

man lighttpdwhatis lighttpdwhereis lighttpd

Sample outputs:

lighttpd (8) - a fast, secure and flexible web serverlighttpd: /usr/sbin/lighttpd /usr/lib64/lighttpd /usr/share/man/man8/lighttpd.8.gz

You can use package manager to dig into lighttpd:
# rpm -qa | grep lighttpd
Sample outputs:

lighttpd-1.4.32-1.el6.x86_64

To find out more about lighttpd-1.4.32-1.el6.x86_64 package, type:
# yum info lighttpd-1.4.32-1.el6.x86_64
Sample outputs:

Loaded plugins: auto-update-debuginfo, protectbase, rhnplugin, securityThis system is receiving updates from RHN Classic or RHN Satellite.0 packages excluded due to repository protectionsInstalled PackagesName : lighttpdArch : x86_64Version : 1.4.32Release : 1.el6Size : 664 kRepo : installedSummary : A web server more optimized for speed-critical environments.URL : http://lighttpd.net/License : Revised BSDDescription : It is a secure and fast web server a very low memory footprint compared : to other webservers and takes care of cpu-load.

OR use rpm command:
# rpm -qi lighttpd
Sample outputs:

Name : lighttpd Relocations: (not relocatable)Version : 1.4.32 Vendor: nixCraftRelease : 1.el6 Build Date: Sun 03 Feb 2013 03:22:08 AM CSTInstall Date: Mon 04 Feb 2013 04:44:26 AM CST Build Host: rhel6.nixcraft.net.inGroup : System Environment/Daemons Source RPM: lighttpd-1.4.32-1.el6.src.rpmSize : 680402 License: Revised BSDSignature : (none)URL : http://lighttpd.net/Summary : A web server more optimized for speed-critical environments.Description :It is a secure and fast web server a very low memory footprint comparedto other webservers and takes care of cpu-load.

Debian / Ubuntu Linux user can use the following commands:
# dpkg --list | grep lighttpd
# apt-cache search lighttpd
# apt-cache show lighttpd

Sample outputs from the last command:

Package: lighttpdPriority: optionalSection: universe/webInstalled-Size: 841Maintainer: Ubuntu Developers Original-Maintainer: Debian lighttpd maintainers Architecture: amd64Version: 1.4.28-2ubuntu4Provides: httpd, httpd-cgiDepends: libattr1 (>= 1:2.4.46-5), libbz2-1.0, libc6 (>= 2.4), libgamin0 | libfam0, libldap-2.4-2 (>= 2.4.7), libpcre3 (>= 8.10), libssl1.0.0 (>= 1.0.0), zlib1g (>= 1:1.1.4), lsb-base (>= 3.2-14), mime-support, libterm-readline-perl-perlRecommends: spawn-fcgiSuggests: openssl, rrdtool, apache2-utils, ufwConflicts: cherokee (<= 0.6.1-1)Filename: pool/universe/l/lighttpd/lighttpd_1.4.28-2ubuntu4_amd64.debSize: 279838MD5sum: 65aedfd0e0ab6d3ee28e7b394567ed22SHA1: 34a9156fa3d23635eb24efb436de585c0594f046SHA256: 751d6f8309d249740d7aab240a74b6bae713e524cf6815544b6cdbb6107fded2Description-en: A fast webserver with minimal memory footprint lighttpd is a small webserver and fast webserver developed with security in mind and a lot of features. It has support for * CGI, FastCGI and SSI * virtual hosts * URL rewriting * authentication (plain files, htpasswd, ldap) * transparent content compression * conditional configuration and configuration is straight-forward and easy.Homepage: http://www.lighttpd.netDescription-md5: 267ee2989b526d8253e822e7d8244ccdBugs: https://bugs.launchpad.net/ubuntu/+filebugOrigin: Ubuntu

lsof command find out what is using port 80

Type the following command
# lsof -i :80 | grep LISTEN
Sample outputs:

apache2 1607 root 3u IPv4 6472 0t0 TCP *:www (LISTEN)apache2 1616 www-data 3u IPv4 6472 0t0 TCP *:www (LISTEN)apache2 1617 www-data 3u IPv4 6472 0t0 TCP *:www (LISTEN)
See also
  • Linux: Find Out Which Process Is Listening Upon a Port
  • ss: Display Linux TCP / UDP Network and Socket Information
  • See man pages for more info

Did you notice? 🧐

nixCraft is ad-free to protect your privacy and security. We rely on reader support to keep the site running. Please consider subscribing to us on Patreon or supporting us with a one-time support through PayPal or purchase official merchandise. Your support will help us cover the costs of hosting, CDN, DNS, and tutorial creation.

Linux: Find Out What Is Using TCP Port 80 (2024)

FAQs

How to check what is using port 80 in Linux? ›

To check what's using Port 80:
  1. Open Command Line and usenetstat -aon | findstr :80. -aDisplays all active connections and the TCP and UDP ports on which the computer is. ...
  2. Then, to find which programs are using it, take the PID number and put them intasklist /svc /FI "PID eq[PID Number]"
  3. Closing programs should resolve.

How do you find out which service is using a port in Linux? ›

To list what services are listening* on a particular port on a device in your environment, run the following commands in a Windows Command Line or a Linux Terminal window on the device the port is on: Windows: netstat -ano | findstr [Port Number] Linux: netstat -ano | grep [Port Number]

How to see what program is using a port in Linux? ›

Linux: The Netstat.exe command has a switch that can display the process identifier (PID) associated with each connection to identify port conflicts. This information can be used to determine which process (program) listens on a given port.

How do I test TCP port 80? ›

Perform the following steps to check whether the port is listened on:
  1. Open the Command Prompt window.
  2. Run the following command: netstat -ano | findstr :80. If TCP 0.0. 0.0:80 0.0. 0.0:0 LISTENING 4 is displayed, all traffic from port 80 is listened on. Otherwise, you must modify the listen address.
May 9, 2022

How do I know if port 80 is running? ›

Port 80 Availability Check
  1. From the Windows Start menu, select Run.
  2. In the Run dialog box, enter: cmd .
  3. Click OK.
  4. In the command window, enter: netstat -ano.
  5. A list of active connections is displayed. ...
  6. Start Windows Task Manager and select the Processes tab.

How do I see what process is running on a port? ›

In order to check which application is listening on a port, you can use the following command from the command line:
  1. For Microsoft Windows: netstat -ano | find "1234" | find "LISTEN" tasklist /fi "PID eq 1234"
  2. For Linux: netstat -anpe | grep "1234" | grep "LISTEN"
May 19, 2022

How do you check what is using a port? ›

Use netstat -anob to list all established and listening ports. The command "netstat -anob" shows all in-use ports and the binary (application) which use them. Example: In this example we see the process msg_server.exe which is listening on ports 3600 and 3900.

How to check port details in Linux? ›

Check open ports in Linux
  1. Launch a Linux terminal.
  2. Type ss to display all open TCP and UDP ports.
  3. Another option is to use the nmap lsof netstat netcat.
Jan 19, 2024

What is the netstat command in Linux? ›

The network statistics ( netstat ) command is a networking tool used for troubleshooting and configuration, that can also serve as a monitoring tool for connections over the network. Both incoming and outgoing connections, routing tables, port listening, and usage statistics are common uses for this command.

How to check which application is using port 8080 in Linux? ›

Linux:
  1. Open a Terminal: Use a terminal application such as GNOME Terminal, Konsole, or xterm.
  2. In the terminal, enter the following command: sudo lsof -i :8080 .
  3. Look for the line with the local address *:8080 in the output.
  4. Note the PID associated with that line.
Jul 17, 2023

What is the lsof command in Linux? ›

The 'lsof' command in Linux is a utility that provides information about files that are opened by processes. It stands for 'List Open Files'. It's a powerful tool that can help you understand which files are being used by which processes.

What is running on my port 5000? ›

Recent versions of macOS have a system setting called AirPlay Receiver, under System Settings -> AirDrop and Handoff (v13. 2 Ventura). When that setting is enabled, macOS uses an http connection via port 5000 to allow "nearby devices to send video and audio content to your Mac with AirPlay," it says here.

How do I make sure port 80 is open? ›

How do you open port 80?
  1. Enter your router's IP address into your browser bar. Log in when prompted.
  2. Navigate to the "Port Forwarding" section and fill out the forwarding form.
  3. Check "Enabled" or "On" next to Port 80. Then, save your settings.
Mar 19, 2024

How do I know if my TCP port is working? ›

Type "Network Utility" in the search field and select Network Utility. Select Port Scan, enter an IP address or hostname in the text field, and specify a port range. Click Scan to begin the test. If a TCP port is open, it will be displayed here.

What is the TCP 80 port? ›

However, Port 80 provides an HTTP connection under TCP protocol. This port provides an unencrypted connection between the web browser and the web servers, which leaves the sensitive user data exposed to cybercriminals and may lead to severe data misuse.

How do I know what port is listening to Linux? ›

Open Terminal: Launch the terminal on your Linux system. Run Netstat Command: Enter the following command to display all open ports:perlCopy codenetstat -an | grep LISTEN This command filters and shows all listening ports.

How do I check port usage? ›

If you would like to test ports on your computer, use the Windows command prompt and the CMD command netstat -ano. Windows will show you all currently existing network connections via open ports or open, listening ports that are currently not establishing a connection.

How to check port connectivity from Linux? ›

On a Linux computer
  1. Open Terminal on your Linux computer.
  2. Enter "telnet + IP address or hostname + port number" (e.g., telnet www.synology.com 1723 or telnet 10.17. xxx. xxx 5000) to run the telnet command and test the port status.
  3. If the port is open, a message will say Connected to 10.17. xxx. xxx.

How to check if port 8080 is in use in Linux? ›

Linux (Debian/Ubuntu)
  1. open the terminal and enter sudo apt install net-tools.
  2. open the terminal and enter netstat -ltnp | grep -w ':8080'
  3. You should then see the application using said port on the far right of the terminal [PID]/SomeApplicationName.
Oct 26, 2019

Top Articles
The Bitcoin Lightning Network | NYDIG
Best Home Security Systems for Apartments in 2024
Pet For Sale Craigslist
Noaa Charleston Wv
Tesla Supercharger La Crosse Photos
Apex Rank Leaderboard
Craigslist Furniture Bedroom Set
15 Types of Pancake Recipes from Across the Globe | EUROSPAR NI
Devourer Of Gods Resprite
A Fashion Lover's Guide To Copenhagen
Johnston v. State, 2023 MT 20
Med First James City
Fairy Liquid Near Me
Sand Castle Parents Guide
272482061
VMware’s Partner Connect Program: an evolution of opportunities
Unit 33 Quiz Listening Comprehension
Espn Horse Racing Results
Tnt Forum Activeboard
Jinx Chapter 24: Release Date, Spoilers & Where To Read - OtakuKart
Craighead County Sheriff's Department
The Tower and Major Arcana Tarot Combinations: What They Mean - Eclectic Witchcraft
Del Amo Fashion Center Map
Sister Souljah Net Worth
Disputes over ESPN, Disney and DirecTV go to the heart of TV's existential problems
Directions To Nearest T Mobile Store
Barista Breast Expansion
Access a Shared Resource | Computing for Arts + Sciences
Cylinder Head Bolt Torque Values
Orange Park Dog Racing Results
Gncc Live Timing And Scoring
Ezstub Cross Country
Kelley Fliehler Wikipedia
Manuel Pihakis Obituary
Jay Gould co*ck
Appleton Post Crescent Today's Obituaries
Chattanooga Booking Report
2008 Chevrolet Corvette for sale - Houston, TX - craigslist
R Nba Fantasy
Tiny Pains When Giving Blood Nyt Crossword
Kornerstone Funeral Tulia
R/Moissanite
Barstool Sports Gif
Sams Gas Price Sanford Fl
VPN Free - Betternet Unlimited VPN Proxy - Chrome Web Store
Quiktrip Maple And West
Gummy Bear Hoco Proposal
Roller Znen ZN50QT-E
Autozone Battery Hold Down
De Donde Es El Area +63
Overstock Comenity Login
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 5494

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.