Nmap is a free and open-source utility which is used to scan networks and security auditing. Nmap can discover hosts and services on a computer network by sending packets and analyzing the responses. The utility is available on almost every os, it is available for windows, linux and mac.
Download Nmap –
To download Nmap you can simply head towards the official website by clicking here. In case if kali Linux and parrot os, it is already available in there so you will not need to download the utility.
Please note that scanning websites from Nmap is not legal, in some cases if you are trying to too much in deep then you will need written permissions from the owner of the website and the IP holder.
How to launch Nmap?
In Windows hosts you can simply install nmap and run it from the desktop icon using administrator privileges . In linux hosts there are 2 ways of doing it, in case of kali linux and parrot os you can find the icon and click to start and later give it root privileges by entering your password .
The other way is you can simply run
You can use it as a manual for using commands, just scroll down and head towards examples.
How to do simple scans and be legal?
As already mentioned, scanning networks and websites using nmap can be illegal, you may need written permissions to so.
So, to do scans be legal you can use scanme.org, they offer you to perform scans on their website without any issues, but please read their conditions so that you do not harm their website.
Now lets see a simple example to do a scan.
To do so simply use
nslookup command following the website url or address. If you do not know the IP address of the website and using the command.
will give you its address. Now when you get the address you can use the same for scanning the network by
the address should be written as IP address which you found on the previous scan and without quotes.
This is how you can do a simple network scan. Now you can also save your scans in a text file for simplicity by using the command
nslookup 18.104.22.168 >> result.txt
Please note that nmap is a very noisy scanning utility and you need to be anonymous and legal in some cases to do so. Please ensure that you use it for legal and educational purposes.
- Nmap Command in Linux with Examples
- How to Scan Vulnerabilities of Websites using Nikto in Linux?
- How to Compile and Run C/C++/Java Programs in Linux
- Run Levels in Linux
- Run commands as root with sudo
- How to run Linux Commands on Windows 10?
- How Should I Start Learning Ethical Hacking on My Own?
- Simple Calculator in Bash
- Compile our own Android Kernel in 5 Simple Steps
- Dockerizing a simple Django app
- Getting System and Process Information Using C Programming and Shell in Linux
- Terminal Mail and Linux Security Mail
- Zombie Processes and their Prevention
- Initializing and Cache Mechanism in Linux Kernel
- Reset a lost Linux administrative password and Explanation
- dup() and dup2() Linux system call
- mindepth and maxdepth in Linux find() command for limiting search to a specific directory.
- Network configuration and trouble shooting commands in Linux
- Introduction to Linux Shell and Shell Scripting
- Operations on Audio/Video files using ffmpeg, avconv, and youtube-dl
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.