-   Linux - Newbie (
-   -   Totally Linux Ignorant - Please help! (

BookWorm 10-03-2003 07:24 AM

Totally Linux Ignorant - Please help!
I am looking to edit the hosts file in Red Hat Linux 8, but I have NO idea where to start. I am trying to learn but so far no basically nothing about Linux. If someone could explain the process of how to open, edit and save the hosts file I would appreciate it very much. Speak to me like I'm completely ignorant because, at this point, I am. Thanks in advance for any help! :)

Baldrick65 10-03-2003 07:39 AM

The "hosts" file resides in the /etc directory. You haven't said if you're using KDE or GNOME, but in any case, you need to be root to edit that file.

Try opening up a console, type in su and enter the root password when prompted then kedit /etc/hosts. This will open up a text editor similar to Windows Notepad. Make the changes and save.


Madrinator 10-04-2003 01:02 AM

Learn to use vi or vim they're available on any linux distro and are widely used.

Look in the HOW-To's.


Kroenecker 10-04-2003 02:42 AM

As was mentioned before, you need to be logged in as root.

Type on the command line:

/bin/su - and then enter your password.

Then what you need to do is use a text editor of some sort to actually change the file. I am positive that you can use vi as was suggested. I prefer to use emacs, but that is just me.

emacs /etc/hosts (if installed) or vi /etc/hosts
or kedit /ect/hosts (if installed)

Your choice! Just try one as a regular user first if you are nervous. You can't blow up your machine doing it.

I have never used vi in gui mode so Im not sure what it's like, but emacs is very, very easy to use and it even gives you a backup in this format filename~ (which I am sure is standard for all text editors) so that you can go back if you make a mistake.

Good luck. It is really very easy;)

All times are GMT -5. The time now is 01:55 PM.