Nmap can also be asked to check the operating system used on the target machine. This information is very useful when you perform the vulnerability-identification process later on.
To use this feature, give Nmap the -O option.
The following is an example of this feature's usage. We want to find the operating system used on the target machine:
nmap -O 172.16.43.156
The following command lines are the result of this command:

Based on the preceding information, we can see that the remote system is a Linux operating system using Linux kernel versions 2.6.9 - 2.6.33. If there are vulnerabilities on those Linux kernels, we can exploit them.