Steps for Editing the Hosts File on Linux

Step 1: Open the Terminal in the Linux operating system & run the following command. 

*Note: You may also be asked to enter the password before you run the command.

Command: sudo nano /etc/hosts

 

Step 2: A new editor will open, now enter the IP Address along with the Domain Name in the editor. After making the changes, press Enter or F9 to save the data into the host file.

 

By applying this, 2-step procedure, we can easily host file in the Linux Operating System.


How to Edit Your Hosts File on Windows, Mac, or Linux

Oftentimes, it becomes a necessary task to edit the host file in Windows, Mac, and Linux operating systems. The host file might be changed by some malicious attack on your machine or sometimes you need to get control access to some websites, then you should make some changes in the host file. In this article, we will go through some easy steps that will help to edit Mac, Linux, and Windows host files.

Similar Reads

Steps for Editing the Hosts File on Windows

Prerequisite – How to Show Hidden Files and Folders in Windows 10...

Steps for Editing the Hosts File on Mac

Step 1: Open the Terminal of the Mac operating system & execute the following command....

Steps for Editing the Hosts File on Linux

Step 1: Open the Terminal in the Linux operating system & run the following command....