InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Mac Command Line tutorials

  • Bulk convert jpeg files to png using sips on mac
  • Custom terminal tab title and ssh on mac
  • How to convert text to speech on Mac using command line utility say
  • How to join multiple pdf files on Mac
  • How to use qpdf to add/remove password from pdf on mac
  • Install redis on Mac
  • Mac - find which process is listening on a port
  • Mac - hide and unhide a file or directory
  • Mac - open a terminal from a folder
  • Mac - print java home on command line
  • Mac - search files on command line using mdfind
  • Mac command line convert svg to png
  • Mac command line utility open - some handy tips for better productivity
  • Mac terminal - how to close shell on exit
  • mac pkgutil - quick start guide
 
  • Home
  • > Tutorials
  • > Mac
  • > Mac Command Line

Mac – find which process is listening on a port

on Dec 29, 2022

We can use lsof or netstat to find which process is listening on a port. Here are the steps:

  1. To see which process is listening on port 8080 using netstat
    sudo netstat -anv | grep [.]8080
    tcp4       0      0  127.0.0.1.8080         *.*                    LISTEN      131072 131072  48921      0 0x0100 0x00000106
  2. To see which process is listening using lsof
    sudo lsof -i :8080
    or
    sudo lsof -i -P | grep LISTEN | grep :8080
  3. Once you get the process id, use the ps command to see its name
    ps -f -p 48921

Suggested posts:

  1. Use x2go to access remote Ubuntu Linux
  2. Enable query log without restarting mysql on Linux
  3. CSS – enlarge image on hover
  4. How to connect to mysql server using ssh port forwarding
  5. Impact on LC_ALL on Linux sort
  6. Install Android 8 on Pixel 2
  7. AngularJS format date using date filter
  8. How to prevent ssh session freezing due to timeout
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Mac, Mac Command Line
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress