In this answer to a question related to interpreting the values of TTL from a ping
operation it is said that the TTL values vary depending on the operating system. I understood more or less the purpose of TTL, which is basically used to prevent loops in the network. At each hop, that value is decremented, and when it reaches 0, the packet, if not arrived at destination, is dropped. I am not sure if this value is really associated with the operating system or with the actual router or modem, or something else. Please, explain me this.
My question is: how can I find those initial values? It would be nice if someone gives an exhaustive answer (i.e. both for Windows and Unix-based OSs, and maybe using the terminal or some other interface) .
A workaround could be to ping, and see the ttl value, and then to traceroute, and count the number of hops, but it could not be precise enough...