Homelinux tutorialHow to use Nmap on Linux

How to use Nmap on Linux

Use nmap on linux – Today we are going to look at how to use the Nmap tool in this Linux tutorial section. This tool is pre-installed on Linux and if you do not have this tool on your device you can install it using the command given below. You can also use this tool through termux.

					sudo apt install nmap

If you want to run this Nmap tool on your Linux you need to type the command sudo Nmap in the terminal and run it. And there is another way in Linux by clicking on the Linux logo in the top left side corner and information gathering > Network and port scanner > Nmap

What is Nmap?

Nmap is a network scanning tool. Use Nmap to locate IP pockets, connected devices, and running operating systems

How to use nmap on linux?

Basic scan on single ip

First we have to look at the basic ping scan. This ping scan does not check the open port but checks whether the target is alive or not.

					nmap -sn <target IP address>

How to use Nmap on Linux
Output for basic scan on single ip

Quick TCP Scan

If you want to find all the TCP open ports in an IP address then just scan using the command given below, this method will only get the TCP open port.

					nmap -T4 -F<target IP address>
How to use Nmap on Linux
Output for quick tcp scan

Basic scan on entire subnet

If you want to check all the devices in your wifi or WLAN connection you do not need to type the IP address individually, you just need to connect 255 ( to the router IP address. You can see that out of 255 hosts

How to use Nmap on Linux
Output for basic scan on entire subnet

Reason Scan

Normally Nmap scan will notify all open ports. However, you do not know that this particular port is open. So this Nmap reason scan helps you. Nmap reason scan clarifies why a particular port is open to you.

					nmap --reason<target IP address>
How to use Nmap on Linux
Output for reason scan

Service Enumeration

Now that you have a live host and you also know which ports are
open, it’s time to enumerate the services associated with those ports. For
example, you can see that port 21 is open. Now you need to know which
service is associated with it and what is the exact version of the server
catering the service. This scan will take some time to give results so wait patiently.

					nmap -sV<target IP address>
Output for service enumeration

Besides this, many scan options can be found by clicking on the Nmap tutorial button in the menu.

Now you know how to use the Nmap tool and if you have any queries you can ask me through the below command section.


1 Comment

Leave A Reply

Please enter your comment!
Please enter your name here

Most Popular