Skip to content

Instantly share code, notes, and snippets.

@zenorocha
Last active May 19, 2025 05:25
Show Gist options
  • Save zenorocha/18b10a14b2deb214dc4ce43a2d2e2992 to your computer and use it in GitHub Desktop.
Save zenorocha/18b10a14b2deb214dc4ce43a2d2e2992 to your computer and use it in GitHub Desktop.
/etc/hosts on Windows

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file

notepad

For Windows 10 and 8
  1. Press the Windows key.
  2. Type Notepad in the search field.
  3. In the search results, right-click Notepad and select Run as administrator.
  4. From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts
  5. Make the necessary changes to the file.
  6. Click File > Save to save your changes.
For Windows 7 and Vista
  1. Click Start > All Programs > Accessories.
  2. Right-click Notepad and select Run as administrator.
  3. Click Continue on the Windows needs your permission UAC window.
  4. When Notepad opens, click File > Open.
  5. In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
  6. Click Open.
  7. Make the necessary changes to the file.
  8. Click File > Save to save your changes.
For Windows NT, Windows 2000, and Windows XP
  1. Click Start > All Programs > Accessories > Notepad.
  2. Click File > Open.
  3. In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
  4. Click Open.
  5. Make the necessary changes to the file.
  6. Click File > Save to save your changes.
@loRes228
Copy link

hostname -I
😂

@CrazyhubXD
Copy link

Data scientist is the sexiest job of the 21st century, but without data, what is a data scientist? Harvard Business Review calls data the new oil. There is an enormous shortage of individuals qualified for data-driven careers. As a novice, you can be lured to wet your feet in the constantly changing domain of data science. Skyappz is one of best data science course with placement, will provide you with in-depth knowledge of data analysis applications such as data mining and machine learning. Learn what data science is and how it helps solve real problems. Start your journey in data science today with this easy guide.

Visit our website : https://skyappzacademy.com/datascience/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment