How to Install Nmap

For Nmap Questions and Answers use this forum HERE.

installing nmap


[00:00:00] Let's talk quickly about downloading and installing Nmap. This is usually a fairly painless procedure as Nmap can on most platforms, at least be installed and upgraded with just a single command. And you can see a command here, this command being the example of what you would put in on a Debian based system or a ubuntu, which would install Nmap through your.


Package manager. I actually recommend running Nmap on Linux, because if you do run it with Linux, then you have available to you other command line tools that you can interact with Nmap that is also possible on windows and Mac, but just not in quite the same native way as it is with Linux, but saying that both these command.


Version of Nmap and the GUI version Zenmap of Nmap is available for windows, Mac, BSD, Solaris, and other platforms. My personal preference and recommendation is to run Nmap on kali Linux. [00:01:00] If we go here, if you go to this URL or whichever URL it happens to be when you do a search for Kali Linux images, then you want to download the latest image or ISO image so that you can install this operating system.


This is a Debian based pen testing, Linux distribution. It's designed for pen testing. Nmap is a pen testing tool or can be used as part pen testing. If you're not familiar with Kali, it's definitely worth using to familiarize yourself with security tools. And it's a good tool to use with Nmap. And it'll give you access to all of the other tools that I'm using as part of this demonstration on this course, I use Kali to run Nmap.


Now, if you don't have Kali or you don't want to install Linux operating system, then you can install a virtual operating system. So you'll need to get yourself a hypervisor. So whatever your operating system is. So if you have windows, then get yourself, hold of the windows host version, and also get yourself the expansion pack here.[00:02:00] 


And then if you pop over to the Kali website, you can get an image for Kali, which you can see here, download, and then you can run that image through the hypervisor, through virtual box, and you'll be able to get access to Kali through your main operating system. Installing Kali in a virtual machine makes Nmap quick and easy to get up and running on Linux.


If you don't have Linux as your main operating system, if you're on windows or Mac, you don't need to run it on Linux. It's not essential that you do that. It's just my recommended platform for the best performance. That's all. But if you wanna get running quick on this course, then certainly install it in whatever operating system you've got right now.


On windows and Mac, it's unlikely that Nmap is preinstalled, but on Linux, there is a chance that you may already have Nmap. So if you type in Nmap dash dash version, you'll be able to see whether or not you have it and what version you've got and then [00:03:00] check out what the latest version of Nmap is and see whether you have the latest version.


Linux versions may be quite out of day, actually. So it is worth checking what it is. You've got. So let's talk about the various options for installing it. It is possible to install it from the source code and to do that, you'll need to follow the instructions that are here based on the platform that you've got different, depending on the platform that you've got choosing the source install allows for more ability in determining how Nmap is built, an optimized.


For your system to build Nmap from source. Check out this section here, where there are simple package instructions for most common distributions, but most people won't need to install from source though. So otherwise, if we're not installing from source, then you wanna check out this page here. This is the main install URL.


And what you wanna look for here is you wanna [00:04:00] look for your operating system, the operating system. You want to install it once you can see here, Linux, windows, Mac, et cetera. So let's have a look at the Linux page or click on this. So Linux users can choose between a source code installers of mention, or using binary packages provided by their distributions, such as your red hat, your Debian and et cetera.


Or you can get them binary directly from the N map site, which is here. We can see the latest binary packages here, the Linux Mac OS windows, et cetera, but we're talking about Linux right now. The binary packages are quicker and easier to install. And for those new Linux, I recommend installing from a Binary because this allows for consistent management in terms of upgrading, removing, or surveying software on the system, a downside to using binary though, is that packages created by the distribution.


Often behind the [00:05:00] nmap.org source releases, which are these, you can see here. So getting it from the distribution would be like using yum on red hat or fedora or app to get on Debian that would be getting it via distribution. Or you can get the banners here from the Nmap site, which will be up to date through yum or through app.


Get. Is that they can be behind or out of date versus the N map site, but most the distributions keep their Nmap packages relatively current. There are few are way out of date. Kali should have the latest, as long as you app get update an app, get dis upgrade. So you have the latest version of Kali. So let's jump back here to the Linux page, the red hat fedora man, Drake and yellow dog distributions have an application manager named yum, which I've just mentioned, which manages the software installation and updates from the central RPM repository.


If we scroll down here, we can see here an example of [00:06:00] how you would install it. Using the package manager. Yum. For those distributions yum install. Nmap. Very very simple. And if we scroll down further, we can see examples for Debian and Debian and based systems. And we've got app get install Nmap and another option for Debian.


And so say the version that you've got is not giving you the latest version via app get, and you can obtain the latest version from here. Which is the RPM format binaries, and you can convert them to Deb packages using the alien command, which you can see detailed here and then install them using the DP kg command, which you can see it's showing you how to do here.


And of course you can install from source, as I've mentioned. And with the RPM packages, you can see here that you can actually install them directly from the site, as opposed to using the distribution and the distribution software manager like [00:07:00] yam. So red hat, fedora, man, Drake, et cetera. You can just directly install it here from Nmap.


So that's Linux. But as I said, I recommend using Kali we pop over here. If you are in Kali and as I've mentioned already, what you wanna run is. App get update and, and app get dis upgrade. And that will update Kali to the latest version. You should get the latest version of Nmap. So we're finished with Linux there and quickly on windows.


That's essentially, you just need to download the executable of the latest version and install as normal, really simple. And if we scroll down here onto Mac, get the latest DMG file and install as normal on Mac, you do have a over have the option of using a package manager on both windows and on Mac. If you're not familiar on windows.


The package manager is chocolate and the package manager [00:08:00] on Mac is home brew. These allow you to install things via the command line. So if you wanted to install this, then if we go down to the install page, this is the windows chocolate. You would need to run this command, copy it and paste it. And that will install the package manager.


And then you want to find the package you want to install it. Be Choco, install Nmap. This is the same as apt get or yum and on home brew for your Mac, you run this command to install home brew. And then you have brew install Nmap and that will install Nmap. So those are two other options for installing Nmap on windows.


And Mac using package managers. What is the advantage of doing that? Well, it just simply means that you can do it via the command line and that might be easier and you can also keep them updated a little bit easier. And one final thing to mention it is possible for you to want to [00:09:00] verify cryptographically that you have dial of the genuine thing.


So check out the instructions on the install page based on your platform for how to do that. So that's the Nmap install. It is relatively simple because you can just use a package manager or just use an executable for windows and Mac, or it's already on Kali. So it should be fairly painless.

Complete and Continue  

Become a Member and Get Unlimited Access to 30,000+ Top Cyber Security Courses And Labs.