nmap in ubuntu code example Example 1: install nmap ubuntu sudo apt-get install nmap Example 2: nmap scan ubuntu sudo nmap 192.168.0.1