Solved

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

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

773 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