Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Among some other servers installed in my Ubuntu system, one is the dictd server. The documentation says it uses port 2628. Running

sudo nmap -p 0-9000

results in:

Nmap scan report for
Host is up (0.000010s latency).
Not shown: 8995 closed ports
21/tcp   open  ftp
80/tcp   open  http
111/tcp  open  rpcbind
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
3128/tcp open  squid-http

It does not list port 2628 used by dictd server (which is up, I checked with ps.) I don't know what's wrong with the command that I used!

My question is how can I list all servers (like dictd and others including some games serves) along with their port numbers? (preferably using console tools)

share|improve this question
Only I can say is to try with netcat. command: netcat -z -n -v -w 1 1-9000 2>&1 | grep succeeded. Netcat will try to make connection and if service run you will see – 2707974 Mar 26 '14 at 8:44
@2707974 that gives the same ports as listed above with nmap.. – precise Mar 26 '14 at 8:53
dictd work on tcp port by default, I think. Try to scan udp ports nc -vvzu 1-9000 -w 1 – 2707974 Mar 26 '14 at 8:57
no positives with udp ports either.. – precise Mar 26 '14 at 9:07
If service work and use tcp must be in LISTEN state because waiting for connection. netstat -l, must see it. – 2707974 Mar 26 '14 at 9:26

This task is what the netstat tool is for. Nmap is a great port scanner, but the kernel is more authoritative, since firewalls can block a port scan.

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.