editing the host file in OSX???

S

stu_69

Guest
Can anyone tell me how to edit the host file in OSX? I need to add some entries and if I try using textedit it wont allow me to save it. I have not got a clue about UNIX (although I wish I did) so can someone explain ** they have managed to edit the host file in OSX?? Is there a way to do without using UNIX Command?

Cheers
Stu
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
If you have BBEdit you can do it, but since usually only us developers use BBEdit I am going to assume that you do not have it.. What I can do is walk you through the process.

1. Open up your terminal application
2. Type in "sudo pico /etc/hosts"
3. Type in your administration password
4. Use your arrow keys to maneuver the cursor and type in whatever entries you are wanting to put in your hosts file
5. Once you are done, hit Control-o
6. and then hit Control-x

You are done! Then you can restart your computer and that should take care of whatever you were doing :)
 
OP
S

stu_69

Guest
Thanks for the reply mate. I found a Text editor called "TextWrangler" which allowed me to do it.

Cheers
stu
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Murlyn said:
If you have BBEdit you can do it, but since usually only us developers use BBEdit I am going to assume that you do not have it.. What I can do is walk you through the process.

1. Open up your terminal application
2. Type in "sudo pico /etc/hosts"
3. Type in your administration password
4. Use your arrow keys to maneuver the cursor and type in whatever entries you are wanting to put in your hosts file
5. Once you are done, hit Control-o
6. and then hit Control-x

You are done! Then you can restart your computer and that should take care of whatever you were doing :)

A pico man huh, and I thought you were a Unix man. A real Unix man uses vi. lol :p :D
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
*laugh* no I was and still am definitely a mac man :) I used to be a dos man.. and I've used vi, but it's just too much of a pain in the butt! :)
 
OP
N

nko

Guest
I was thinking the same thing last night on my Linux box :). nano- now THERE's a REAL (UNIX) man (geek)'s editor ;).


I think it'll show what an expert I am to mention that my favorite feature of Vi is that by default it only scrolls one line at a time. Vim also remembers where you left off on a document for when you next open it. Maybe my liking for these tyes of things can help to explain why I like OS X :)
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
I have been using vi for many, many years. So it is second nature to me. ;)
 
Joined
Oct 27, 2002
Messages
1,345
Reaction score
0
Points
36
Location
Vermont
Your Mac's Specs
17" iMac G4 800MHz 1GB RAM
I used to be a pico man, which is basically nano. Now I use vi exclusively. I like vi mainly because it is also your command line editor. So you just learn vi once, and it functions in 2 places :)

Totally off topic, BTW.
 
OP
N

nko

Guest
Speaking of off topic, I think you guys helped this other guy already, and now we're all just standing around chit-chatting about ramblings on that happen after the deal we were here for. I think this is the part where we all usually kinda get quiet, someone says, "yeah...", we all start looking around in odd directions, and then one person says, "well, I guess that's it. Later!" and we all disperse.


*pause*

.....

Yeaaaah.... welp, I guess that's it. I'll be in my office if you need me :)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top