cat /etc/hosts

Category: Self-Hosting

cat /etc/hosts

View the local hosts file — entries here override DNS and map hostnames to IPs on this machine only

The hosts file maps hostnames to IP addresses locally and is checked before DNS. Entries here can override or supplement DNS for any hostname.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.