How to edit the hosts file on Windows, Mac or Linux (2023)

Table of contents

Have you ever found yourself in the situation that you have transferred your website to a new hosting and want to preview how it will work before pointing to the website's domain? Fortunately, this is entirely possible, and one of the most popular ways to do this is by editing your computer's hosts file.

In this article, we examine what the hosts file is and what its uses are.

What is the hosts file used for?

The hosts file is a plain text file that maps hostnames to IP addresses. It is part of every major operating system (OS) like macOS, Windows, Linux, etc.

BeforeDNSwas introduced, there was no centralized and automated system for hostname resolution. In the past, every computer or local area network relied on its hosts file, which contained a list of well-known host names and their respective IP addresses.

With the implementation of DNS, computers no longer depend on this file because they can automatically obtain hostname addresses from the DNS network.

However, the hosts file remains even in the latest operating systems (OS) as it is still useful.

You can map a selected domain to an IP address of your choice. This change is local, it only works for your computer without affecting other visitors. The most common cases where you want to use your hosts file are:

  • You're launching a new website, but haven't registered a domain name yet. You can modify your hosts file to connect a non-existing domain to the hosting's IP and start building the website.
  • You migrated an existing website from one hosting to another. You want to preview how the migrated website will work on the new hosting before closing your previous hosting account. So you don't want to connect your domain to the new hosting just yet, but you need to preview how the website will load from the new hosting.
  • You want to block access to a website from your own computer. This is easily accomplished by pointing a website's domain to the invalid address 0.0.0.0, which creates a loopback.

How do you find your website's IP address?

The hosts file is most commonly used to force a connection between your website and a domain name that is pointed to a different address by DNS records. To do this, you must first obtain the IP address of your website.

You can usually find the address in the control panel of your hosting account. ForSiteGroundUser this is located on the siteWebsite-Tools > Dashboard> IP and Name Servers > Location IP.

To have an example for this exercise, we created a website calledmeine-neue-website.com. This domain name is unregistered, meaning it doesn't exist and has no DNS records. Any visitor who tries to open this address will see the error "This website cannot be reached".

How to edit the hosts file on Windows, Mac or Linux (1)

In this case, the address is35.214.215.226which must be used when mapping in the hosts filemeine-neue-website.comto this website.

(Video) How To Edit Hosts File in Windows 10

Similarly, you can create a website, name it after a domain name that DNS points elsewhere, and map the website's domain using your hosts file.

Read along to find out how to edit your hosts file depending on the operating system you are using.

How to edit hosts file in Windows 8, 10 and 11?

Editing the hosts file is essentially the same in all versions of Windows - you must edit the hosts file as wellNotepad. The only difference is that you need to run Notepad as an administrator on Windows 7 and later, while on older versions (Windows XP and earlier) this is not mandatory.

However, regardless of the Windows version, the default location of the Windows hosts file is the same unless you installed the operating system on a different partition:

C:\Windows\System32\drivers\etc\hosts
  • Step 1.Open Notepad from the Windows menu

    In this guide, we are going to edit the hosts file on Windows 10. First, click on theWindowsIcon (Start Menu).

    How to edit the hosts file on Windows, Mac or Linux (2)

    Start typingnotepad,which automatically activates the search function. The first result will beNotepad. Right-click the icon and select itExecute as administrator.

    How to edit the hosts file on Windows, Mac or Linux (3)
  • Step 2.Open the hosts file in Notepad

    In the Notepad window, click thefilemenu and selectOpen minded,which opens a file selection box.

    How to edit the hosts file on Windows, Mac or Linux (4)

    Make sure you selectAll filesotherwise thehostFile does not appear in the dialog because it is a hidden file and not a.txtRenewal. Navigate to the hosts file path, select the file and pressOpen minded.

    How to edit the hosts file on Windows, Mac or Linux (5)
  • Step 3.Edit the hosts file

    Windows 10's hosts file is pretty much the same as on any other operating system. It contains a few lines that define the address for the local host and other services, although note that they are commented with the "#" symbol. This means that they are not activated, just left as examples.

    To add your custom hostname settings, add a new line to the end of the file and omit the "#" symbol.

    The new entry should have the following format:

    IP_Address ihredomain.com www.ihredomain.com

    Replace "IP_address" with the actual IP address of the website and "yourdomain.com" with the domain that you associate with the IP.

    In our case we connect the non-existent domainmeine-neue-website.comto the IP address35.214.215.226, so the line is:

    (Video) How to Edit Hosts File on Your Mac Computer

    35.214.215.226 meine-neue-website.com www.meine-neue-website.com
    How to edit the hosts file on Windows, Mac or Linux (6)

    To keep the new changes, save the file using the keyboard shortcutStrg + S, or fromfilemenu >Save on computer.

How to edit the hosts file in any macOS version

  • Step 1.Open Terminal in macOS

    You have to use thoseTerminalApplication for editing MachostFile. To open it, navigate toFinder > Go > Utilities.

    How to edit the hosts file on Windows, Mac or Linux (7)

    Open the Utilities menu where Tools for Mac can be accessed. Find theTerminalicon and double-click it.

    How to edit the hosts file on Windows, Mac or Linux (8)

    Alternatively, you can quickly openTerminalby bringing up theSpotlight searchShortcut barCommand + Spacebar. Enter in the pop-up windowTerminaland pressEnter.

    How to edit the hosts file on Windows, Mac or Linux (9)
  • Step 2.Open the hosts file in the terminal

    Once the terminal window is open, you can edit thehostFile with one of the available text editors.

    First, make sure you are in the top-level folder of your Mac by typing the following command:

    CD /

    PressEnterto confirm the command that will take you to yoursMacintosh-HDmain folder.

    How to edit the hosts file on Windows, Mac or Linux (10)

    The location of the hosts file on Mac computers is:

    /private/etc/hosts

    In our example we use theNanotext editor. To be able to change the hosts file, you needAdministrator rights (sudo). The command to open the file is:

    sudo nano /private/etc/hosts
    How to edit the hosts file on Windows, Mac or Linux (11)

    Once you have confirmed the command withEnter, you will be prompted for the administrator password. Enter the password and confirm withEnter.

    How to edit the hosts file on Windows, Mac or Linux (12)
  • Step 3.Edit the hosts file in the terminal

    This is where you can add your custom hostname settings. By default, the file contains just a few lines that define the address forpremises HostandBroadcasthost.

    Use the arrow keys to move the cursor under the last line where you can add a new entry. To point a domain to a specific server, use the following format:

    IP_Address ihredomain.com www.ihredomain.com

    You must replaceIP Addresswith the IP of the site andihredomain.comwith the actual domain name.

    (Video) How to edit Mac Hosts File

    In our example we want to use the non-existent domainmeine-neue-website.com,which is not registered and has no active DNS settings.

    The website formeine-neue-website.comis hosted on the IP address35.214.215.226.

    So to force a computer to open this domain from this IP address, you should put the following line in the hosts file:

    35.214.215.226 meine-neue-website.com www.meine-neue-website.com
    How to edit the hosts file on Windows, Mac or Linux (13)

    After adding the new settings, press the combinationControl + O(WriteOut) to confirm it, then pressEnter. Finally you can pressStrg + Xto exit the nano editor.

Edit the Linux hosts file

  • Step 1.Open Terminal on Linux

    Just like in macOS, you can edit themhostFile on a Linux operating system from theTerminalApplication. To open the menu with all applications, navigate to the respective button in the lower left corner. Depending on the Linux version, the tool is located on the main page or in theUtilitiesSection. ChooseTerminalicon to open the application.

    How to edit the hosts file on Windows, Mac or Linux (14)
  • Step 2.Open the hosts file in the terminal

    once insideTerminalIn the console, make sure you are in the top-level folder by typing the following command:

    CD /

    The way tohostFile on Linux is:

    /etc/hosts

    Editing the file requires administrator rights (sudo) and a text editor such asNano. Use the following command to open and edit the file:

    sudo nano /etc/hosts
    How to edit the hosts file on Windows, Mac or Linux (15)

    The system will prompt you to enter the administrator password before opening the file. After entering the password, pressEnter.

    How to edit the hosts file on Windows, Mac or Linux (16)
  • Step 3.Edit the hosts file in the terminal

    Use the arrow keys to place the text cursor under the last line written and add the hostname settings. In our case we add an address with the hostnamemeine-neue-website.com. Therefore the line should be:

    35.214.215.226 meine-neue-website.com www.meine-neue-website.com
    How to edit the hosts file on Windows, Mac or Linux (17)

    To confirm the new changes, press the key combinationControl + Oand pressEnter.You can then exit the editor by pressingStrg + X.

How can I test changes to the hosts file?

After adding hostname settings, you can test the changes from any web browser like Chrome, Firefox, Opera, Edge, etc. When the changes take effect, the hostname will be resolved from the specified IP address.

The example used so far is the unregistered domainmeine-neue-website.com. It's a nonexistent domain that doesn't have a DNS zone. If the changes don't take effect, you'll see "DNS_PROBE_FINISHED_NXDOMAIN', which is the typical error message for an unregistered domain.

(Video) How to Edit the Hosts File on Your Mac

How to edit the hosts file on Windows, Mac or Linux (18)

However, if the hostname correctly points to an IP address where a website has been installed, the website will open.

How to edit the hosts file on Windows, Mac or Linux (19)

Here's a different way to preview a website

The Hosts file is the most reliable and stable way to preview websites, although there are alternative methods if you find the Hosts file difficult to edit. However, these alternatives have specific strengths and weaknesses and are therefore not suitable for every situation.

We'll explore the other ways to preview a site and the scenarios in which you can use it.

Generate a temporary URL with SkipDNS

A popular way to preview a website is to use a temporary URL. Instead of having to change your hosts file, there are websites that can generate a temporary URL that any computer can use.

This method is only suitable for previewing an existing website. Editing or creating a website with a temporary URL is not recommended because many website applications are domain dependent and new content may be recorded using the temporary URL. This URL will eventually expire, making the content inaccessible.

One of the most popular websites that can generate this type of URL isSkip DNS. On their homepage you will be shown a form to fill out.

You must enter the IP address of the website in the fieldIP Addressand the hostname in the fieldLive-URL. As in our previous example, we want to showmeine-neue-website.comto the IP of the SiteGround hosted website35.214.215.226.

How to edit the hosts file on Windows, Mac or Linux (20)

After providing these details, use the buttonCreateto generate the temporary URL. On the next page you will be prompted to agree to the SkipDNS Terms of Service. You will then see the temporary URL SkipDNS generated to open your hostname from the specified IP address.

How to edit the hosts file on Windows, Mac or Linux (21)

You can use this URL in any browser or computer to open your website, but remember that this link is only valid for a limited time.

How to edit the hosts file on Windows, Mac or Linux (22)

Use a temporary domain with SiteGround

SiteGround users have another option when it comes to accessing a website without a registered domain name – a temporary domain that is automatically generated by the system. It is important to note that a temporary domain can only be set up in your SiteGround account at the time of initial website setup. Once you replace it with another domain, the system will delete the temporary domain.

Therefore, this method is suitable when you start a new website without a registered domain name. It's also useful if you've migrated an existing website but haven't pointed its domain to your account yet and you need to preview the migrated content.

For more information, see this article abouttemporary domains.

(Video) How to Edit Mac Hosts File using Terminal?

summary

The hosts file can come in handy when you want to create a custom hostname mapping just for your computer without affecting other visitors. In general, the most common uses are:

  • Linking a non-existent domain to your website
  • Force a domain to open a different website than the one it currently points to through DNS records from your computer
  • Block access from a computer to a specific hostname

Editing the hosts file might seem daunting at first, but with clear instructions it's not that hard. We hope this article has been able to provide some clarity.

FAQs

How do you edit the hosts file in Linux? ›

Linux
  1. Open a Terminal window.
  2. Enter the following command to open the hosts file in a text editor: sudo nano /etc/hosts.
  3. Enter your domain user password.
  4. Make the necessary changes to the file.
  5. Press Control-X.
  6. When you are asked if you want to save your changes, enter y.
Jul 23, 2019

How do I edit hosts file in Windows? ›

You can edit and save the host file, C:\Windows\System32\drivers\etc\hosts , in a few simple steps:
  1. Copy or drag the host file to your machine's desktop.
  2. Edit the file with notepad or any word processor of your choice.
  3. Copy or drag the file back to the /system32/drivers/etc folder.

Is there a hosts file in Mac? ›

Mac users can find the hosts file in the /private/etc/hosts directory. You can edit it with any text editor as long as you have root user privileges.

How do I edit a host file? ›

Click File in the menu bar at the top of Notepad and select Open. Browse the Windows Hosts File location: C:\Windows\System32\Drivers\etc and open the hosts file. Make the needed changes, as shown above, and close Notepad. Save when prompted.

Where is hosts file in Linux? ›

The Linux Hosts File's Location

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. Since the hosts file is a system file, you'll need administrative rights to save changes.

How do I open host file on Mac? ›

To open Hosts file on Mac, which is hidden, you need to use Terminal:
  1. Launch Terminal.
  2. Type sudo nano /etc/hosts and press Return.
  3. Enter your admin password.
Jan 11, 2022

Can you edit hosts file on iOS? ›

Yes, you can edit the iPad hosts file, but you need to be jailbroken. Once you've done that, download Cydia (app market), and get iFile. The hosts file is located within "/etc/hosts". Save this answer.

Where is the hosts file in Windows? ›

In Windows 10 the hosts file is located at c:\Windows\System32\Drivers\etc\hosts. Right click on Notepad in your start menu and select “Run as Administrator”. This is crucial to ensure you can make the required changes to the file. Now click File > Open and browse to : c:\Windows\System32\Drivers\etc\hosts.

What is the hosts file in Linux? ›

What is the hosts file in Linux? Simply put, the hosts file is a way to map hostnames to IP addresses. This is very important with certain setups and to make networking on Linux a bit easier. In a sense, the hosts file acts as a local DNS server.

How do I open hosts file in Windows? ›

Press Windows Key + R. Type %WinDir%\System32\Drivers\Etc into the Run window and click OK. Open the hosts file with a text editor such as Notepad.

How to edit hosts file Windows 10 command line? ›

To edit the hosts file:
  1. Change the line 127.0. 0.1 localhost to 127.0. ...
  2. In Notepad, select File then Save to save the file.
  3. Open a command prompt.
  4. Type ping me and press Enter.
  5. Observe the results. ...
  6. In Notepad, remove me from the line 127.0. ...
  7. In the command prompt, type ping me and press Enter.
  8. Observe the results.
Nov 3, 2022

Where is host in Mac? ›

The Hosts file on a Mac is found in the /etc/hosts folder.

What is the host name for Mac? ›

The local hostname, or local network name, is displayed at the bottom of the Sharing settings window. It identifies your Mac to Bonjour-compatible services. The local hostname is your computer's name with . local added, and any spaces are replaced with hyphens.

How do I edit a file in Mac Terminal? ›

In the Terminal app on your Mac, invoke a command-line editor by typing the name of the editor, followed by a space and then the name of the file you want to open. If you want to create a new file, type the editor name, followed by a space and the pathname of the file.

Why edit hosts file Windows? ›

Modifying your hosts file enables you to override the domain name system (DNS) for a domain on a specific machine. DNS management is useful when you want to test your site without the test link prior to going live with SSL, verify that an alias site works prior to DNS changes, and for other DNS-related reasons.

How do I add entries to etc hosts in Linux? ›

Adding the IP-to-hostname mapping in /etc/hosts
  1. Open the /etc/hosts file. vi /etc/hosts.
  2. Add a line of text in the format ip-address localhost localhost. localdomain. As shown in Figure 1, enter 192.168. 1.158 imctest imctest. IMC to map 192.168. 1.158 to the host name imctest in the IMC domain. ...
  3. Save and close the file.

Can we edit host File without admin rights? ›

By default, you cannot edit the hosts file without administrator privileges.

How to edit a file in Linux? ›

Edit the file with vim:
  1. Open the file in vim with the command "vim". ...
  2. Type "/" and then the name of the value you would like to edit and press Enter to search for the value in the file. ...
  3. Type "i" to enter insert mode.
  4. Modify the value that you would like to change using the arrow keys on your keyboard.

Does Linux use a host file? ›

The hosts file is a plain text file that maps hostnames to IP addresses. It is a part of every major operating system (OS) such as macOS, Windows, Linux, etc.

How to change hostname in Linux? ›

Running the hostnamectl command, using nmtui, or editing the hosts file to change the hostname permanently. Using the hostname [new_host_name] command to change the hostname temporarily and without rebooting the system.

How do I open a host file in Linux? ›

Open the Terminal by pressing Ctrl+Alt+T.
  1. Type the command below, then key in your admin password: sudo su.
  2. To open the hosts file using Gedit, type the following command and press Enter: sudo gedit /etc/hosts.
Jun 7, 2022

How do I edit hosts file on mobile? ›

The easiest way to edit the hosts file on your device is to use the Android Debug Bridge, so go ahead and set it up. Once you're done, navigate into the folder where ADB is located and type cmd into the location bar, which will open a command prompt in the current folder.

What is host name on iOS? ›

Host Name: This is typically your domain name preceded by "mail.". This can be found in the E-mail Accounts section of the cPanel, under More > Configure Mail Client. User Name: Your email address. Password: The password for your email address.

Can you use file Manager on iOS? ›

Use the Files app to manage your files on your iPhone, iPad, or iPod touch. On your iPhone, iPad, or iPod touch, you can manage your files in the Files app. When you make changes to your files on one device, your edits are automatically updated on every device using iCloud Drive.

How to edit host file using cmd? ›

STEP 1: On your computer, right-click the Start menu, then select the Command Prompt (Admin) option. STEP 2: When the Command Prompt window opens, type the command: cd drivers\etc then press [Enter].

How do I add a host file in Windows? ›

How to add a static entry in the hosts file?
  1. Open your text editor in Administrator mode.
  2. In the text editor, open C:\Windows\System32\drivers\etc\hosts.
  3. Add the IP Address and hostname. Example: 171.10.10.5 opm.server.com.
  4. Save the changes.

What is the host command in Windows? ›

The HOST command executes external commands at the operating system level. For a Windows operating system, for example, this is equivalent to running commands from a command prompt in a command window. No output is displayed in a command window.

What is Linux hosting vs Windows hosting? ›

Linux uses custom software and supports most programming languages, while Windows uses specific Microsoft software to run and manage data. Linux works on MySQL, while Windows servers use MSSQL. Windows hosting also uses Microsoft ASP.NET as the main programming language.

How do I find my hostname in Linux? ›

Finding the computer name on Linux
  1. Open a terminal. To open a terminal in Ubuntu, select Applications -> Accessories -> Terminal.
  2. Type hostname at the command line. This will print your computer name on the next line.

How do I change permissions on a hosts file in Windows 10? ›

Hit the start menu or press the Windows key and start typing Notepad. Right-click Notepad and choose Run as administrator. Now you'll be able to edit and save changes to your HOSTS file.

How do I open hosts file as administrator in Windows 10? ›

Workaround
  1. Click Start, click All Programs, click Accessories, right-click Notepad, and then click Run as administrator. ...
  2. Open the Hosts file or the Lmhosts file, make the necessary changes, and then click Save on the File menu.
Sep 24, 2021

How do I edit hosts file in Windows 11? ›

To edit the “Hosts” file on Windows 11, open Notepad as an administrator. Use the “Ctrl + O” shortcut and open the Hosts file from the “C:\Windows\System32\Drivers\etc” location. Add a new IP address and domain mapping – for example, 127.0. 0.1 domain.com .

How to change hostname? ›

Change a server's hostname
  1. Check existing hostname. ...
  2. Modify the value to match your FQDN hostname, as shown in the following example: ...
  3. Open the file at /etc/hosts. ...
  4. Change the domain name (where required) ...
  5. Change networking configuration /etc/sysconfig/network. ...
  6. Change networking configuration /etc/sysconfig/network.
Jun 20, 2022

How to find hostname from IP address in Linux? ›

Get the Hostname From an IP Address on the LAN

When we need to get the hostname of a machine on the same LAN and without a reverse DNS, we can use commands like nmblookup, nbtscan or avahi-resolve. The first two commands are used to lookup NetBIOS names.

How do I find my host IP address? ›

First, click on your Start Menu and type cmd in the search box and press enter. A black and white window will open where you will type ipconfig /all and press enter. There is a space between the command ipconfig and the switch of /all. Your ip address will be the IPv4 address.

How do I open and edit a file in Linux Terminal? ›

How to Edit a File in Linux
  1. There are several different tools within Linux that can be used to edit files. ...
  2. To open a file in Nano, you must enter the nano command followed by the path of the file you are attempting to open. ...
  3. The other popular option for editing a file in Linux is to use the vi command.

How do I edit a file in Windows Terminal? ›

Quick Start:
  1. Just type micro to create and edit a new text file.
  2. Type micro <filename> to start editing an already-made file.
  3. To save: ctrl + s.
  4. To see a list of keybindings: alt + g.
  5. To quit: ctrl + q.
Sep 10, 2010

How do I open text editor in Linux Terminal? ›

Steps
  1. You can also double-click the Terminal icon in your list of Applications, or by clicking your Dash menu (if you're using GNOME) and searching for terminal .
  2. Nano is a very easy-to-use text editor that comes preinstalled on all Ubuntu-based Linux distributions.
Aug 11, 2022

How do I add entries to a host file? ›

How to add a static entry in the hosts file?
  1. Open your text editor in Administrator mode.
  2. In the text editor, open C:\Windows\System32\drivers\etc\hosts.
  3. Add the IP Address and hostname. Example: 171.10.10.5 opm.server.com.
  4. Save the changes.

How do I add an entry to a host file on a Mac? ›

How to Edit Mac Hosts File
  1. Step 1: Open the Mac Terminal. Open the Finder, and go to Applications > Utilities > Terminal. Type the following in the terminal window: sudo nano /private/etc/hosts. ...
  2. Step 2: Edit Mac Hosts File. The IP address is first, and the server name comes second. Comments are indicated with a '#' sign.
Oct 22, 2018

Does Linux have a hosts file? ›

The hosts file is a plain text file that maps hostnames to IP addresses. It is a part of every major operating system (OS) such as macOS, Windows, Linux, etc.

What is ETC hosts file in Linux? ›

The /etc/hosts file contains the Internet Protocol (IP) host names and addresses for the local host and other hosts in the Internet network. This file is used to resolve a name into an address (that is, to translate a host name into its Internet address).

What is the edit command in Linux? ›

edit makes a copy of the file FILENAME which you can then edit. It first tells you how many lines and characters are in the file. If the file does not exist, edit tells you it is a [New File]. The edit command prompt is a colon (:), which is shown after starting the editor.

How to edit a file in Linux from command-line? ›

Vi:
  1. Open the file using the vi or vim command: vi example_file.
  2. Press the "i" key to enter insert mode.
  3. Make your desired changes. ...
  4. Press the escape "ESC" key to exit insert mode.
  5. Type ":w" and press the enter key to save your changes.
  6. Type ":q" and press the enter key to close the file.
Jul 27, 2022

How do I create and edit a file in Linux? ›

Using 'vim' to create and edit a file
  1. Log into your server via SSH.
  2. Navigate to the directory location you wish to create the file in or edit an existing file.
  3. Type in vim followed by the name of the file. ...
  4. Press the letter i on your keyboard to enter INSERT mode in vim. ...
  5. Start typing into the file.
Oct 13, 2022

What is host command in Linux? ›

host command in Linux system is used for DNS (Domain Name System) lookup operations. In simple words, this command is used to find the IP address of a particular domain name or if you want to find out the domain name of a particular IP address the host command becomes handy.

How do I change the hostname and domain name in Linux? ›

Change a server's hostname
  1. Check existing hostname. ...
  2. Modify the value to match your FQDN hostname, as shown in the following example: ...
  3. Open the file at /etc/hosts. ...
  4. Change the domain name (where required) ...
  5. Change networking configuration /etc/sysconfig/network. ...
  6. Change networking configuration /etc/sysconfig/network.
Jun 20, 2022

How do I change my IP address and hostname in Linux? ›

To change your IP address on Linux, use the “ifconfig” command followed by the name of your network interface and the new IP address to be changed on your computer. To assign the subnet mask, you can either add a “netmask” clause followed by the subnet mask or use the CIDR notation directly.

How do I access host files? ›

To view the hosts file:
  1. Open the Start menu.
  2. In the Run box, type Notepad.exe and press Enter. ...
  3. In Notepad, select File then Open.
  4. Navigate to C:\Windows\System32\drivers\etc.
  5. Change the file type to open from Text Documents (*. ...
  6. Open the hosts file.
  7. Read the comments in the host file.
Nov 3, 2022

How do I find my host entries in Windows? ›

In Windows 10 the hosts file is located at c:\Windows\System32\Drivers\etc\hosts. Right click on Notepad in your start menu and select “Run as Administrator”. This is crucial to ensure you can make the required changes to the file. Now click File > Open and browse to : c:\Windows\System32\Drivers\etc\hosts.

Where can I find host entries? ›

To open the hosts file in Notepad, click "File", "Open", and navigate to C:\Windows\System32\drivers\etc . You'll see a file named hosts . Double click on that file to open it.

Videos

1. Arista TAC Webinar 2023 Series - Session1 (Debugging Layer-2: CLI and Cloudvision)
(Arista Community Central)
2. How to edit hosts file in Mac / Linux
(Sanjeev Maharjan)
3. How to edit the hosts file on a Mac
(20i)
4. How to Edit the Hosts File on Windows
(Evil Comp)
5. [Must Watch] What is Hosts File? | Hindi | TechChip
(TechChip)
6. How to modify a hosts file in linux system?
(AccuWeb Hosting)
Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated: 10/04/2023

Views: 6170

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.