Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Prompt vs System' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Prompt vs System
Authored by: Lazaru5 on Oct 05, '01 03:30:28PM

All this article does is have you change the rc (Resource Configuration) file for tcsh. The default tcsh shell (terminal) prompt includes the system's hostname in it. All you've done is changed the prompt. Likewise, if you use a different shell (zsh - the Z Shell - is also included with OSX {or it was with the PB which is all I've seen}), it will have no effect on the prompt because this change only affects tcsh.

As has been pointed out, /etc/hostconfig is the proper place to change your system's hostname.

If some things, like Apache, break when you change your hostname, it's because of DNS problems. Apache likes to know the IP address of the machine it's running on. If you maintain /etc/hosts along with /etc/hostconfig, Apache should be fine.

BTW, in shell scripts, the backtick character '`' has a special meaning. Placing a command between backticks runs that command. In this case, the result of the command "hostname" is inserted into the variable "host". There is an actual unix command called 'hostname' which returns the system's hostname (it can also set it, but only /etc/hostconfig makes it permanent after reboot).

By now most of you know that 'ls' lists the contents of a directory (folder). If you were to type "set foo = `ls`" and then "echo $foo", you'd get the contents of that variable - in this case, the directory listing - displayed on the screen.

[ Reply to This | # ]