If you wish to connect to a machine by hostname (which is not registered in DNS (Domain Name Server)) you need to add <IP> <Fully Qualified Hostname> <Hostname> in Hosts file.
Adding an entry in Non Vista (Microsoft O.S. XP, 2000, NT) is pretty simple. Open hosts file (using text editor like notepad, wordpad..) and hostname entry in above format like
192.168.0.1 myMachine.myDomain myMachine
- Location of hosts file in windows is C:\Windows\System32\drivers\etc (where C is drive in which you installed operating system)
- Location of hosts file in Unix/Linux is /etc
Change hosts file in Windows Vista
If your O.S. is windows vista, it won’t let you save your hosts file if you don’t open file editor (like notepad) with Administrator Privileges
- Click Start -> All Programs -> Accessories
- Right click Notepad and select “Run as Administrator“
- On Notepad click on File -> Open
- Browse to “C:\Windows\System32\Drivers\etc“
- Change the file filter drop down box from “Text Documents (*.txt)” to “All Files (*.*)“
- Select file hosts and click on Open
- Add entry of host which you wish to connect in format
<IP Address> <Machine Name> <Machine Alias> like
192.168.1.1 myMachine.myDomainName myMachine
Note : If you can’t find Accessories under All Programs then to identify Program (Notepad) type notepad in Start Search box after clicking on Start menu at bottom left of your laptop
* Ensure you don’t savefile as type text (hosts.txt), file name should be just hosts
Related Posts for Unix/Linux
- Linux Common Queries
- IPTABLES : Linux based firewall
- Change “hosts” file in Windows Vista
- How to find PID listening particular Port on Linux/Solaris 10
- How to change hostname on Linux (Red Hat or Oracle)
- How to add Disk in Linux/OEL (Virtual Linux) on VMware Server
- How to extract / mount ISO file on Linux





Good hands-on exercises (installation, patching, cloning), very experienced trainer worth every penny 
17 users commented in " Change “hosts” file in Windows Vista "
Follow-up comment rss or Leave a TrackbackBy default in vista , UAC ( User Account Control ) is enabled.
To disable, go to Control Panel, Click
on “classic view”, click on “user accounts”,
click on “turn user account control on or off”
Then disable the option by unchecking it.
Restart once.
Now to Start > Run ( windows key + R )
type “drivers”
click on etc > hosts
Now you can edit and save with all privileges.
I did whatever u told me but nothing happened.
Here is what my host file contrains.
127.0.0.1 localhost
#——————————————
# Lineage][Storm Connection
#——————————————
77.234.135.65 L2authd.lineage2.com
77.234.135.65 L2testauthd.lineage2.com
216.107.250.194 nProtect.lineage2.com
#——————————————
Nothing happened means ?
Can’t you see entry in hosts files ?
Or
you can’t save hosts file
When i go to save the changes a window pop ups and says:The creation of this file cant be done(it doesnt say that but i translate it because my pc is in greek)and a little bit more down it says:Be sure that the destination in C and the name of the file are correct.
I dont know what happenned about few days later i could change the hosts but yestarday i couldnt.
Did you open notepad (any tool you are using to edit file) as administrator ?
Right click on file and under properties check if this file (hosts) is not write protected .
Also as suggested by Famy, in comment section disable user access control and reboot vista machine
Ok i did it ty for help
ty = thank you !!!
i want to open any other website by adding the ip add and the domain name or the website name but instead of opening it , it blocks the website i.e the name of the website eg:- 209.&&.$$.$$ http://www.download .com suppose the ip add is of google then when ever i type download.com google should come up but that does’nt happens , it just blocks download.com
its related to hosts file
Thank you for the information. I could edit
host file sucessfully
can’t find the hosts file in w2k8
any idea?
You have to change attributes to edit file.
Solution:
http://www.emeksepeti.com/blog/post/2009/08/06/Changing-your-hosts-file-in-Vista.aspx
Thank you so much for posting this! It was a GREAT help!!
hi sir i am Dhananjay i hv a core i3 330 processor. laptop can i install oracle apps r12 e-business suite. ok thank you reply plz…..
@ dhananjay, Yes you can. Ensure that you have atleast 4 GB memory
Thanks!!! U rock, dude.
I switch different Hosts-Files with this tool here:
http://tools.toflo.de/HostsSwitcher/
Leave A Reply