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