Solved

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

Posted on 2014-11-17
3
127 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
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 167 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 166 total points
ID: 40449464
also, `lsof | grep 7778`
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
High Available Storage based on linux 6 70
Python variable _ manually assigned 9 66
linux redhat 7.2 10 47
Can't ping New Linux Servers 40 28
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

863 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

28 Experts available now in Live!

Get 1:1 Help Now