How Is a Hostname Resolved on a Linux Machine?
Contents for the Small Private Network, Just File Lookup Is Enough but for Most of the Medium to Large Networks, Dns and Nis Is Used to Resolve the Hostname to...
For the small private network, just file lookup is enough but for most of the medium to large networks, DNS and NIS is used to resolve the hostname to IP address. If the hostname is not found in this file then Linux consults to DNS for name resolution.
How is a hostname resolved?
Hostname Resolution refers to the process through which an assigned hostname is converted or resolved to its mapped IP Address so that networked hosts can communicate with each other. This process can either be achieved locally on the host itself or remotely through a designated host configured to serve that purpose.
Must Read
How do I find the hostname resolution in Linux?
How can I resolve a hostname to an IP address in a Bash script?
- Ping. Ping is the most simple and built-in tool that is available on almost all operating systems. …
- Nslookup. Nslookup is widely used to resolve the hostname to an IP address. …
- Host. …
- Dig.