Solved

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

Posted on 2014-11-17
3
132 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 35

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Securing Azure Oracle instance of Linux VM 4 75
number in printf 13 43
linux 13 109
Looking for a program called HoneyMine. 3 73
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Fine Tune your automatic Updates for Ubuntu / Debian
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

730 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