Linux 101 : Useful Nmap commands

We could use the below command, to scan the default ports - most commonly used ones -:

The output describes the ports and the services associated with them.

If we don't specifically mention it, nmap only scans the TCP ports.

To scan the UDP, we could add the "-sU" parameter:

Nmap does not scan all the ports, only the widely used ones. 

To be able to scan all ports or a range of ports on a system, we use the below command:


The [1-65535] is the range of ports that could exist on a machine.

To be able to check the version of the running services their associated open ports, we could use the below command:

-V : stands for version.

To check what system is the scanned machine running, we could use the "O" - capital letter - parameter as below:


We could achieve the same results using the "-sU" parameter, a "netbios" service will be a clue that the machine is running windows for example.

To scan a network of machines in order to check their IP addresses for example, we could use the below command:

An example of an network IP address could be "".

To display the network interfaces on our machine along with some other information like the routing tables, we could use the below command:


Leave as a comment: