Solved

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

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

Thanks
0
Comment
Question by:Anthony Lucia
3 Comments
 
LVL 34

Assisted Solution

by:Seth Simmons
Seth Simmons earned 167 total points
Comment Utility
do this as root

netstat -at | grep 7778

it will show if the port is open
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 167 total points
Comment Utility
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 166 total points
Comment Utility
also, `lsof | grep 7778`
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now