[SOLVED] centos 5.6 /etc/hosts file: deletion of lines occurring
location: linuxquestions.com - date: August 20, 2011
I add a line to my /etc/hosts file and the next day(?) or several hours later(?) I go back to the file and the line(s) I added have been deleted. What is likely happening?
[SOLVED] /etc/hosts file is readonly for root in ubuntu Server. But rw is for root
location: linuxquestions.com - date: March 13, 2012
In my Ubuntu server 10 64bit, /etc/hosts file is read only. Rights of /etc/hosts are
-rw-r--r-- 1 root root 392 2012-03-09 09:55 hosts. But i am unable to edit the file. I do not have gui installed in it. /etc/resolv.conf is editable, but /etc/hosts file alone is not editable. This machine is in OPSource Cloud.
I have logged in as root user only. Kindly help
Edit the hosts file
location: ubuntuforums.com - date: June 10, 2011
Could someone point me to an easy to follow tutorial which shows how to edit the hosts file please. Thanks in advance
How edit hosts file
location: ubuntuforums.com - date: December 11, 2012
I need to edit host file
But it's "Readying only" and i can't save it after i modify it.
I should run the pc as Root but i dunno how
Can u pls help me on that
HOWTO: Amend your hosts file to block ads (by site)
location: ubuntuforums.com - date: August 22, 2006
Note: this is very much a beginner's guide.
Q: What is a HOSTS file / Why might I want to do this?
A: It's explained nicely at http://www.mvps.org/winhelp2002/hosts.htm
Q: But why do this in Ubuntu? My Ubuntu is like a shield of steel!
A: Many reasons. But mainly to save bandwidth by not loading lots of rubbish. For each site listed as 127.0.0.1, content (usually ad banners etc) from that site isn't loaded. In a web browser that picture/frame will 404.
So, how to do it:
The host file in Linux lives at /etc/hosts. We are going to add some lines to it.
***** NOW HEAR THIS *****
A) ***BACK UP*** your /etc/hosts BEFORE YOU START
B) You must APPEND to (not overwrite) the file. You need the stuff that's already in there! That means: paste in the additional lines AFTER what's already in there!
C) I do not recommend doing this if you HOST WEB PAGES from your PC.
End of disclaimer.
1) >>>>>>> BACKUP YOUR HOSTS FILE <
hosts file keeps getting reset/rewritten, hosts.ac the culprit
location: ubuntuforums.com - date: December 16, 2011
This post is to help others who've encountered the same problem. I've been looking (Google'ing) around for quite some time and have just now come up with the solution. Tried to make the title Google-friendly
Ever since a week ago, I haven't been able to change anything in the file. Whenever I reboot my system, the file gets overwritten.
Just to be clear - the file is not wiped and restored to an original (clean) state, it's instead reverted to a previous state. Older hosts I've added to the file are still there, but I just can't add any new hosts to the file.
Also, if I "sudo gedit /etc/hosts", the changes are saved for that session. But once I reboot, they're gone.
Looking into the /etc folder, I've found a file called hosts.ac, which seemed like a copy of my hosts file. When I tried changing it - Presto! The /etc/hosts file was changed to reflect the content of this file.
After some investigation, seems this file was added after installing Cisco AnyConnect (hen
location: ubuntuforums.com - date: September 2, 2011
Looking for a tutorial which shows how i might use the Hosts file to prevent undesireable sites from being loaded into the browser.
Help configuring .hosts file
location: ubuntuforums.com - date: January 26, 2013
I finally managed to use my mobile as a remote for vlc.
However I have some doubts about how I edited the file
I uncommented the line that says:
which as far as I now should mean to accept connection from devices connected to my local network. But what /16 means?
Also what if I don't want only one device to be able to control vlc? The problem is that my phone has dynamic ip (and if I can I'd like to keep it that way).
Thanks a lot for the help,
Update to hosts file not working
location: ubuntuforums.com - date: August 28, 2011
I have updated hosts file with some entries and restarted the machine. The changes were not effective. I also tried 'nscd restart .... but no use.
For example, I added following entry
After the restart I was able to browse cnn.com. Any thoughts?
Is there a way to recover the content of /etc/hosts file?
location: linuxquestions.com - date: April 17, 2008
I am new to linux (unix in general) and while exercising "tr" command from
one of my school books, I end up erasing the content of the /etc/hosts file and then I read the following note:
#Do not erase the following line, or various programs
# that require network functionality will fail.
I use cat command to see which line my book was referring to and found that
the file is empty.
So, my question is how to fix this problem. Is there a way to know to recover the content of that file? How.
I'm using a Mac OS X (10.5 ) Leopard on the Intel iMac.
Page: 1 2 3 4 5 6 7 8 9 10