| | |
enquiring the status of a port
![]() |
•
•
Join Date: Jan 2008
Posts: 40
Reputation:
Solved Threads: 0
Use either or both of these commands to find out if a port is already taken by a service:
netstat -A inet -lnp
lsof -i tcp:the_port_you_are_inquiring_about
For example, if I wan to know if port 8080 is already taken, I do:
netstat -A inte -lnp
I then search on the output to see if a service is already listening on port 8080.
I also use the other one:
lsof -i tcp:8080
If you get a response, then another service is listening on port 8080 and you cannot use it.
However, if you get no response, then it is free to use. No service is listening on port 8080.
Thanks.
--Willie
netstat -A inet -lnp
lsof -i tcp:the_port_you_are_inquiring_about
For example, if I wan to know if port 8080 is already taken, I do:
netstat -A inte -lnp
I then search on the output to see if a service is already listening on port 8080.
I also use the other one:
lsof -i tcp:8080
If you get a response, then another service is listening on port 8080 and you cannot use it.
However, if you get no response, then it is free to use. No service is listening on port 8080.
Thanks.
--Willie
![]() |
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: Desperately need Sendmail help!
- Next Thread: LAMP instalisation
| Thread Tools | Search this Thread |
Tag cloud for Linux Servers and Apache
.net amazon apache apple asus bbc centos cisco citrix cloud cloudcomputing code datacenters debian dell desktops development distributions distros drivers economy eeepc enterprise fedora fsf gadgets gentoo gnu gos government gpl hardware hp hyper-v ibm java jobs knoppix kundra kvm laptop laptops lawsuits licensing limo linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome politics print qumranet redhat robot sco server servers slackware software solaris source stallman sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xen






