how can i check port state ?

Hello experts ,

i am wondering , i there a command in Linux that i could check if the port is open or closed without using complex tools such as nmap ,

i mean like that : this is just example is not correct command :
> check port 80
> open

like this .. or if is not there that command how can i easily know that the port 29 is open or closed for example ?

thanx in advance
CFIL
CFILAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

modcon_jscottCommented:
man telnet
0
TintinCommented:
If it's a TCP port, then just do

telnet localhost 80
0
CFILAuthor Commented:
MR modcon_jscott:could you please more specific .

MR Tintin .
yes TCP port , when i type
telnet localhost 80
its give me html codes ,

can i do like this ?
telnet localhost 12
to check port 12 ?

i mean i want a comman that just tell me that if its open or closed ,,any TCP ports i choose it .
please could put some example so i can understand the idea ,
Thankx in advance ,
CFIL
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

http:// thevpn.guruCommented:
If you are checking on the localhost use netstat

netstat -an | grep 80
or netstat -an  | grep 25
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
modcon_jscottCommented:
running the command "man telnet" will give you the man page to the telnet command.

yes changing 80 to 12 will check port 12.

If you are running iptables as your firewall you can run this: iptables -L   this will show you wat ports are open and which ports are closed.

If you want to check quite a few ports, google for a "port scanner"

0
http:// thevpn.guruCommented:
adding to the telnet commands if you telnet to a remote daemon and it gives you unable to connect..then in simplest term the tcp port is closed any other result would indicate the port is open..again in the simplest terms.
0
CFILAuthor Commented:
thank you very much modcon_jscott and shakoush2001 ,
MR shakoush2001 thank you for helping me always , i wish to meet you :)..
Good Luck .
CFIL
0
http:// thevpn.guruCommented:
CFIL ..glad I could help..drop the Mr..we are all peers here :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.