Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-03-2003, 06:24 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
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!
Old 10-03-2003, 06:39 AM   #2
Registered: Aug 2003
Location: Dunedin NZ
Distribution: Mint 13 Cinnamon
Posts: 653

Rep: Reputation: 31
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.

Old 10-04-2003, 12:02 AM   #3
Registered: May 2003
Location: Guadalajara, Mexico
Distribution: Mandrake
Posts: 46

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

Look in the HOW-To's.

Old 10-04-2003, 01:42 AM   #4
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't know how to connect to Internet - very ignorant! Lexia Linux - Newbie 3 12-15-2006 04:34 PM
Totally new to linux parttimenerd Linux - Newbie 8 06-20-2006 02:57 AM
Hi...Totally new to Linux. dragonV8 Member Intro 2 02-08-2005 12:43 PM
Only one answer for an ignorant subject in posts! fancypiper General 19 06-07-2003 12:14 PM
MEncoder and its ignorant ways TheFishingGeek Linux - Software 2 05-20-2003 08:57 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration