Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Simon Liquid

macrumors regular
Original poster
Jul 4, 2001
223
0
Iowa
In the Terminal, the prompt has always been my computer's name, as set in the Sharing control panel, and my user name. I got cable internet a few days ago and since then it's used my IP address instead of computer name. Does anyone know how to make it go back the other way? It never changed when I used my modem or airport, if I remember correctly. It's just a little annoying, I could probably live with it.
 
bash lets you customize the prompt: here's how

For example. To have a prompt like this:

superMac:~ Simon$

You add the following line in the .profile file in your home directory. If there is no .profile file just create one.

PS1="superMac:\w \u$"

The \w is replaced with the current working directory and the \u is replaced the current username. The reason why your Mac seems to have a personality disorder is that the default prompt uses \h which is replaced by the current hostname. The hostname can be set by a DHCP server when you connect to a network, but if you're not connected to a network it is just set to the computer name you have given yourself.

If you're not sure how to edit the .profile file you can use the editor pico:
pico .profile
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.