Nmap is a powerful network scanning tool available on Windows, macOS, and Linux. In this module, we will cover:
Windows users can install Nmap using the official installer from the Nmap website.
nmap-7.94-setup.exe
)..exe
file and double-click it.C:\\Program Files (x86)\\Nmap
).Open Command Prompt (cmd.exe
).
Type the following command and press Enter:
nmap --version
If installed correctly, you will see the version number (e.g., Nmap version 7.94
).
Note:
PATH
environment variable.macOS has some built-in network scanning tools that offer limited functionality similar to Nmap:
ping – Checks if a host is online.
netstat – Displays open ports and network connections.
traceroute – Shows the path packets take to a target.
You can use these by opening Terminal (Cmd + Space
, type "Terminal").
Example command to check open ports:
sudo lsof -i -P | grep LISTEN
To install Nmap on macOS, the easiest method is using Homebrew.
Homebrew is a package manager for macOS.
Open Terminal (Cmd + Space
, type "Terminal")
Run the following command:
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"
Follow the on-screen instructions.
Once Homebrew is installed, install Nmap by running:
brew install nmap
Check if Nmap is installed by running:
nmap --version
If successful, you’ll see the installed version of Nmap.
Note:
Nmap is available in most Linux distributions and can be installed using the package manager.
Before installing, update your package list:
sudo apt update && sudo apt upgrade -y # For Ubuntu/Debian
sudo dnf update -y # For Fedora
sudo pacman -Syu # For Arch Linux
sudo apt install nmap -y
sudo dnf install nmap -y
sudo pacman -S nmap
Check the installed version by running:
nmap --version
OS | Installation Method |
---|---|
Windows | Download .exe installer from nmap.org |
macOS | Use brew install nmap (Homebrew) or built-in alternatives (netstat , ping ) |
Ubuntu | Use sudo apt install nmap |
Fedora | Use sudo dnf install nmap |
Arch | Use sudo pacman -S nmap |
Sign-in to your account to access your hacking courses and cyber security labs.
Access all hacking courses and cyber security labs.