To get more robust output during the nmap scan, use the -v option. $ nmap -sP 192.168.2.*Ĥ) Get more information with verbose option To refine the scan and only discover live hosts in a subnet, use the -sP option as shown. For example, the command below scans hosts from 192.168.2.1 to 192.168.2.100 $ nmap 192.168.2.1-100 3) Scan a subnet with nmapĪdditionally, you can use a wildcard to scan an entire subnet as shown: $ nmap 192.168.2.* $ nmap 192.168.2.1,102,103Īlso, you can specify a range of IP addresses using a hyphen. Rather than typing the IP addresses in full, you can separate the endings with a comma as shown. There are different ways of going about this.įirstly, you can specify multiple IP address or domains in a row separated by a space as shown $ nmap 192.168.2.1 192.168.2.103 For instance, you can scan 10 or more hosts or an entire subnet as you work on something else. It’s a convenient way of scanning hosts in a single command instead of scanning each host separately. Scanning multiple hosts at a go comes particularly in handy for extensive networks where you want to scan several hosts at once. The syntax is as shown:Īlternatively, instead of specifying the IP address, you can specify the domain name as shown: $ nmap In its basic form, the nmap command can be used to scan a single host without passing any arguments. Having looked at the installation of nmap, let’s now proceed and see 20 awesome nmap command examples in Linux 1) Nmap command for scanning a single host $ sudo yum -y install nmapįor Arch-based systems, use the pacman package manager as shown. $ sudo dnf -y install nmapįor CentOS 7 / RHEL 7 and earlier versions use the yum package manager. $ sudo apt -y install nmapįor CentOS 8 / RHEL 8 / Fedora 22 and later versionįor CentOS 8 / RHEL 8 and Fedora 22 and later use the dnf package manager. $ sudo snap install nmapĪlternatively, you can choose to go with installing Nmap using package managers unique to each family of Linux distribution.įor Ubuntu/Debian/Mint based distributions use the APT package manager as shown. To install Nmap using snaps, run the command below. This will enable you to download and install snap packages. However, before installing Nmap from snap packages, you need to first enable the snapd daemon. They are readily available in all major Linux distros. Snaps are prebuilt software packages that ship with libraries and dependencies. The universal and easiest way to install nmap is using snap packages. How to install nmapīefore we look at various ways in which the nmap command can be used, let’s check out how you can install this useful command-line tool. In this guide, we highlight some of the handy Nmap commands that you can use to retrieve as much information as you can from host systems. Nmap reveals information such as Active hosts on a network, open ports, OS and service detection, and performing stealth scans to mention just a few. Written in C, C++ and Python and Initially released in September 1997, nmap has become an integral tool for cybersecurity and digital forensic professionals who rely on it to reveal detailed information about target hosts and unearth potential vulnerabilities. Nmap stands for Network Mapper, it is a free and open-source network discovery and reconnaissance tool used for host discovery and collecting detailed information about a host.
0 Comments
Leave a Reply. |