Steps to Edit the hosts
File on Linux
-
Open Terminal:
- Open your terminal application.
-
Edit the Hosts File:
-
Type this command and press Enter
sudo nano /etc/hosts
-
Enter your password if prompted.
-
-
Add Your Mapping:
-
At the end of the file, add a line like this
192.168.0.1 example.com
-
-
Save and Exit:
- Press
Ctrl + X
, thenY
, and hitEnter
.
- Press