Detect services and versions on selected TCP ports
Build a paste-ready command, then review its compatibility and effects before running it.
nmap -sV --version-light -p <ports> <host>Complete required fields to copy the generated command.
Compatibility
Linux + macOS + WindowsVerified for Linux, macOS, Windows using bash, zsh, powershell syntax.
Operational knowledgereview due 2027-01-19
Requirementsnmapnmap must be installed and available on PATH.Network accessThe target must be reachable from the current environment.
Version supportnmap Current supported releasesVerified for linux, macos, windows using bash, zsh, powershell syntax; consult compatibility notes for platform-specific differences.
Expected signalsPORT STATE SERVICE VERSIONRepresentative successful output; values vary with the selected target and system state.
Known errorsnmap: command not foundnmap is missing or is not available on PATH.
Verifynmap -sV --version-light -p {{ports}} {{host}}Re-run the corresponding read-only inspection and confirm the intended state.Rollback noteNo universal automatic rollback is available. Capture the current state and use the tool-specific recovery procedure before applying changes.
Command breakdown
01nmapCommandRuns the nmap stage of this one-liner.
02-sVOptionConfigures nmap with the -sV option.
03--version-lightOptionConfigures nmap with the --version-light option.
04-pOptionSelects the command-specific port, process, or print mode.
05<ports>ParameterA value supplied in the Fill parameters section.
06<host>ParameterA value supplied in the Fill parameters section.
This advanced community-curated one-liner combines several stages. Review every option and placeholder before running it.
Example input
nmap -sV --version-light -p 22,80,443 server.example.com
Example output
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 9.6p1 Ubuntu
80/tcp open http nginx 1.26.1
443/tcp open ssl/http nginx 1.26.1
Illustrative output — exact values vary by system and data.
Official sources