≡ Menu

How to find the remote machine OS easily

Do you ever got a requirement to findout what Operating System(OS) the remote machines has? You might say, “Ah! I am a sysadmin, it’s my daily task”. Good, how will you findout the OS, if you don’t have any sort of rights(console right/admin rights/ports access) on remote machine?

Hmm..It’s simple now!!

You might have many windows and UNIX boxes in your network. If you know one machine name and if you want to find if that machine has windows or UNIX os, try the below steps.

JUST PING IT.

Yes, right. You just ping that machine. If the TTL shows as 127 or less it is windows box and if the TTL shows 254 or less it is a UNIX box.

Test it if you don’t believe.

c:>ping windowsbox

Pinging windowsbox.mydomain.com [172.16.100.10] with 32 bytes of data:

Reply from 172.16.100.10: bytes=32 time=15ms TTL=127
Reply from 172.16.100.10: bytes=32 time<1ms TTL=127
Reply from 172.16.100.10: bytes=32 time<1ms TTL=127

c:>ping unixbox

Pinging unixbox.mydomain.com [172.16.100.20] with 32 bytes of data:

Reply from 172.16.100.20: bytes=32 time=15ms TTL=254
Reply from 172.16.100.20: bytes=32 time<1ms TTL=254
Reply from 172.16.100.20: bytes=32 time<1ms TTL=254

The thing is that windows machine will return 128 as TTL by default and Unix machine returns 255 as TTL. And this TTL will get reduced by one(TTL –) when there is just one hop between your computer and the remote box. And will get reduced by two when you have two hops…and gets reduced by N where are N hops.

Happy Learning..,
Sitaram Pamarthi

{ 2 comments… add one }

Leave a Comment