Fedora Linux Support Community & Resources Center
  #1  
Old 3rd November 2007, 08:49 PM
Imad Offline
Registered User
 
Join Date: Nov 2007
Posts: 14
Need help with hosts file

Hi guys, I'm trying to modify the hosts file in Fedora 7 '/etc/hosts/' but it's set to read-only and I can't modify it. I tried chmodding the file but It didn't work. I tried chmodding it to the following:
chmod 720 /etc/hosts
chmod 644 /etc/hosts
chmod 700 /etc/hosts
chmod 670 /etc/hosts
chmod 600 /etc/hosts
chmod 644 /etc/hosts

but it only seems to open under 644 but no modifying allowed. Any help would be greatly appreciated.
My question is: How can I modify the hosts file?
Kind Regards.
Reply With Quote
  #2  
Old 3rd November 2007, 09:53 PM
homey Offline
Registered User
 
Join Date: Feb 2005
Posts: 415
Sounds like you are trying it as a regular user, try it as root user ( su - )
Reply With Quote
  #3  
Old 3rd November 2007, 11:10 PM
Imad Offline
Registered User
 
Join Date: Nov 2007
Posts: 14
thanks for your help, but I already have tried it as a root login. Maybe I installed the wrong fedora version. Which Fedora version do I need to install?
thanks in advanced.
Reply With Quote
  #4  
Old 4th November 2007, 12:33 AM
northcornice's Avatar
northcornice Offline
Registered User
 
Join Date: Jun 2007
Posts: 15
Post results of this command:
Code:
[wally@FC7L ~]$ ls -l /etc/hosts
Reply With Quote
  #5  
Old 4th November 2007, 01:16 AM
Imad Offline
Registered User
 
Join Date: Nov 2007
Posts: 14
Quote:
Originally Posted by northcornice
Post results of this command:
Code:
[wally@FC7L ~]$ ls -l /etc/hosts
Thanks, the only thing is; the [wally@FC7L ~] is giving me a "command not found" error.
Kind Regards.
Reply With Quote
  #6  
Old 4th November 2007, 03:40 AM
eXDee's Avatar
eXDee Offline
Registered User
 
Join Date: Oct 2006
Posts: 147
That's because that bit is HIS username and hostname.

When people give you commands to run, they should really give them as
$ ls -l /etc/hosts

Don't copy the $ though, that just means as normal user, not root. # means root.

So what he's saying, is run
ls -l /etc/hosts
As a normal user.
Reply With Quote
  #7  
Old 4th November 2007, 07:01 AM
Imad Offline
Registered User
 
Join Date: Nov 2007
Posts: 14
Thanks for everyone's help, I managed to modify the hosts file through the terminal using these commands:
su (login as root)
nano '/etc/hosts' (nano being your text-editor.)
crtl + O (to save changes)
This is the easiest way to modify the hosts file. A friend of mine showed me how to do this.
Kind Regards.
Reply With Quote
Reply

Tags
file, hosts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hosts file adrianoferreira Using Fedora 5 11th January 2008 05:38 PM
Format of the /etc/hosts file pobbz Servers & Networking 2 29th May 2007 05:24 PM


Current GMT-time: 23:45 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat