Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any default listening ports in Linux, like 135 and 445 for directory services in Windows?

While searching for a remote machine, I need to identify whether the machine I am connecting to is Linux or not, to perform some scripting operations based on OS.

I can't use tool like NMap, Since my application is a commercial one and Source code should be a closed one.

share|improve this question
What are you really trying to do here? – Blacklight Shining Oct 7 '13 at 14:15
@BlacklightShining He's trying to identify a remote machine's operating system based on the ports it has open, I think it's pretty clear. – Moses Oct 7 '13 at 14:25
you won't be able to do this. nmap/zenmap probe the IP implementation itself to profile the OS. each TCP/IP stack implementation has idiosyncrasies in how they respond to different kinds of input packets (flags, syn/ack values, fragments, etc) and nmap has a database of indicators which can be used to try to determine teh os in question. – Frank Thomas Oct 7 '13 at 14:31
@BlacklightShining: Mr. Moses is right. – BinaryMee Oct 7 '13 at 14:31
@FrankThomas: I know Mr. frank. But I can't use GPL Licensed tool for my commercial application. But I need to detect OS atleast approximately to reduce my runtime. That's why posted this question. – BinaryMee Oct 7 '13 at 14:33
up vote 0 down vote accepted

Linux has no default "signature" ports, since many of the ports that it uses are not unique to it.

share|improve this answer

The most common listening port on linux systems is port 22 (used for ssh).

You can check for other open ports by calling lsof -i (as root) on the linux machine.

Also an answer to a similar question (which was solved by using nmap) suggests, that you could find out the operating system using only the ping command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.