Thank you this is really great.
also if I am logged into the server, can I do a grep for a specific port
Main Topics
Browse All TopicsHello
2 questions (UNIX Solaris 9:
How do I find available ports on a unix system.
Also if I want to see if a port is listening, to see if the service using that port has started, what is the way to do this.
Thank you:)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If your intent is to create your own service on an open port - or to change ports for an existing service, you can refer to a list of assigned ports:services at the following links:
http://www.iana.org/assign
http://www.iss.net/securit
http://www.chebucto.ns.ca/
Any one that is not already assigned per IANA, then you can use it for your own purposes. See the ff. links for adding new services/processes.
http://docs.sun.com/app/do
http://docs.sun.com/app/do
Business Accounts
Answer for Membership
by: omarfaridPosted on 2007-11-28 at 08:57:40ID: 20366856
Hi,
To see if a port is currently is in use and a process is listening to it, run
netstat -an | grep LISTEN
if you look at /etc/services , you will see the well know services ports (e.g. ftp, telnet, etc).
Any port that is not in use is a free one.
To verify also, you may use telnet to test tcp ports
e.g.
telnet ipaddress tcpport
telnet 10.0.0.1 25
if you get connected then the port is in use, if you get the message connection refused then it is not running.