As I'm a newbie in this, I'm unaware of the differences between making a scan using
nmap -v localhost and
nmap -O localhost?
Any help would be appreciated.
-v stands for Verbose, meaning NMAP will attempt to tell you what it is doing. You'd typically add this option to see if something is malfunctioning, or if you're curious. NMAP supports the "levels of verbosity" trope in some unix commands.
-v is level one.
-vv is level two, so it tells you more than level one.
-vvv is even more. The fun part is "how many levels does this support?" Occasionally there are Easter eggs: the program may tell you to cut it out after a bit!
-O tells NMAP to attempt to guess the operating system of the machine it's scanning.
I assume you are learning nmap on a Linux system? if at any time you have a question about commands, type
man <name of command> and a help screen will appear.
/ lets you search (
n to advance to the next result) and
q quits to the command line. That's how I answered this question, and you can answer other questions like in the future using man :)
nmap -v states it to be verbose. If what you wanted to know was
nmap -sV, it tells nmap to try to discover the service version, for example, try to figure out if something running on port tcp 80 is really an http server or something else.
nmap -O tries to fingerprint the OS version. For example, is the scanned machine a Windows XP, Windows 7, Linux kernel 3.0, OpenBSD, etc.