Contents
On Linux, you can find the hosts file under /etc/hosts. Since it’s a plain text file, you can open the hosts file using your preferred text editor.
Where do I find my host file?
The hosts file is a plain text file used to map host names to IP addresses. On Windows, it is located in the C:WindowsSystem32driversetc folder.
Does Linux have a hosts file?
The hosts file is used to map domain names (hostnames) to IP addresses. It is a plain-text file used by all operating systems including, Linux, Windows, and macOS. The hosts file has priority over DNS.