How do I change the name of locahost?

jcontonio

Registered
I want to change my prompt...so something like
[insurrection $pwd]
how do I do that?

I want to rename my box basically.

Oh, and I also can't get BitchX to run in console mode (>console as login) it's giving me some weird thing about vt100
 
if you're on a network that uses dhcp, you might not be able to do that without asking your network folks to assign you a static ip. then you can go into the network control panel, switch from dhcp to manual configuration (use the pulldown at top) and type in your static ip/computer name.

there are probably other ways to do this if you're not on a network.
 
you have to write a .profile script - it will let you customize everything about your prompt and environment, unfortunately you are using tcsh and I don't know how to write that but here is mine for zsh:

<pre>
Welcome to Darwin!
osx:hotani:/Users/hotani> more .zshrc
// this puts osx:username:pwd in prompt
PS1='osx:%n:%/> '
// this is some alias stuff for ls
alias ls="ls -FA"
// this lets me use vi for my default editor
bindkey -v
// this is paths to all my bin directories...
path=(/bin /sbin /usr/local/apache/bin /usr/bin .)
osx:hotani:/Users/hotani>
</pre>

I think for tcsh the file name is '.profile' and it goes in your home directory.

the syntax for tcsh is slightly different - but if you want to switch to zsh and use the above script type:

niutil -createprop / /users/username shell /bin/zsh

[Edited by hotani on 10-03-2000 at 10:02 AM]
 
Originally posted by wck
if you're on a network that uses dhcp, you might not be able to do that without asking your network folks to assign you a static ip. then you can go into the network control panel, switch from dhcp to manual configuration (use the pulldown at top) and type in your static ip/computer name.

there are probably other ways to do this if you're not on a network.

I'm on a teeny-tiny network using DHCP (3 boxes behind a Linksys router/firewall), and I managed to change my hostname by editing /etc/hostconfig (as root.)
Just change the HOSTNAME entry to the name
you want. My prompt now looks like this:

[samantha:~] dwalker%
 
true - my hostname in /etc is the same as the dns name on our network (so when I type that name in a web browser on another computer I get my webserver). I chose to leave it out of my prompt though, since i thought 'osx' looked cooler (and is shorter!).

prompt customization is fun.
 
Back
Top