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/.*\://'`
- Press the Windows key.
- Type Notepad in the search field.
- In the search results, right-click Notepad and select Run as administrator.
- From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts
- Make the necessary changes to the file.
- Click File > Save to save your changes.
- Click Start > All Programs > Accessories.
- Right-click Notepad and select Run as administrator.
- Click Continue on the Windows needs your permission UAC window.
- When Notepad opens, click File > Open.
- In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
- Click Open.
- Make the necessary changes to the file.
- Click File > Save to save your changes.
- Click Start > All Programs > Accessories > Notepad.
- Click File > Open.
- In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
- Click Open.
- Make the necessary changes to the file.
- Click File > Save to save your changes.
wow, well, you guys seem to be having all this fun editing your 'hosts' file, the problem is, and I'm running windows 7 because windows 10 is absolute GARBAGE, I, for the life of me, can't SAVE the file!! I've tried it in DOS, I've tried using cmd, I've tried powershell, I've tried just using notepad, I've tried attribing it to different attribs to make it so I can write to the file, I've even tried editting the autoexec.bat to edit the file to add the correct address for my WMP and NOTHING!! I am so frustrated! I've been working on this thing for three hours I'm ready to light my computer on fire and run down the street naked!!! HELP!!!!