Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I tell if a port is being used or not

Posted on 2014-11-17
3
Medium Priority
?
137 Views
Last Modified: 2014-11-18
How do I tell if port 7778 is currently being used ?

Thanks
0
Comment
Question by:Anthony Lucia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 35

Assisted Solution

by:Seth Simmons
Seth Simmons earned 668 total points
ID: 40448399
do this as root

netstat -at | grep 7778

it will show if the port is open
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 668 total points
ID: 40448411
You should add the "-n" flag to see the port number instead of its name, otherwise "grep 7778" won't find the port in question.
Additionally add the "-p" flag to see which process is holding the port open (if any).
Add "-u" to see UDP ports along with TCP ports ("-p").
Add a ":" in front of the number so you won't find e.g. a PID instead of a port number.

netstat -atnpu | grep ":7778"
0
 
LVL 19

Assisted Solution

by:jools
jools earned 664 total points
ID: 40449464
also, `lsof | grep 7778`
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question