How to Do a Basic Port Scan with Nmap

To perform a basic port scan with Nmap, you can follow the following steps:

  1. Install Nmap on your system, if it is not already installed. You can download Nmap from the official website: https://nmap.org/download.html
  2. Open a terminal or command prompt and type the following command:
css
nmap <target IP address or hostname>

Replace <target IP address or hostname> with the IP address or hostname of the system you want to scan.

  1. Hit Enter and wait for Nmap to finish scanning. This may take a few seconds or several minutes, depending on the size of the network and the number of ports you are scanning.
  2. Nmap will display a list of open ports on the target system, along with the service running on each port. The output will look something like this:
arduino
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https

Note: By default, Nmap scans the 1,000 most commonly used ports. You can specify a different range of ports to scan using the -p option. For example, to scan only ports 80 and 443, you can use the following command:

css
nmap -p 80,443 <target IP address or hostname>