Tag Archives: nmap usage linux

Scan ports with NMAP

There comes a time when you need to scan your hosts and see what services are on or what ports are listening.

Here is a quick command for scanning TCP ports with NMAP. Throw it on terminal.

nmap -oN nmap.txt -p- -sTV

-p- will scan all the known ports. T stands for TCP and V for versions.

If you want to check a particular port, then specify it with -p. For example:

nmap -oN nmap.txt -p 123 -sTV

Replace with an actual IP or if you scan multiple hosts then just add ips like on the example above. The command above will create nmap.txt to userĀ“s home directory and it will append the information to the file. If you run the command again, then all the content in the nmap.txt will get replaced with the new data. Continue reading