Forum Home
Press F1
 
Thread ID: 42022 2004-01-29 11:40:00 Change Host name on Linux SSH Console... hamstar (4) Press F1
Post ID Timestamp Content User
211031 2004-01-29 11:40:00 Short and sweet...

How do you change your host name in a ssh linux console?

Cheers
hamstar (4)
211032 2004-01-29 13:39:00 You mean the PC's hostname?

Edit /etc/hostname
Use vim, nano, jed, whatever takes your fancy :-)


Chill.
Chilling_Silently (228)
211033 2004-01-30 02:46:00 Or use the hostname command? Graham L (2)
211034 2004-01-31 05:38:00 > Or use the hostname command?

I thought that was only a temporary fix for the problem - it worked but it was lost on rebooting the machine?
cyberchuck (173)
211035 2004-01-31 06:41:00 The hostname command sets it in the currently running kernel (it just sets /proc/sys/kernel/hostname). The change is reset when you reboot.

Edit the file /etc/hostname (/etc/sysconfig/hostname on mandrake) to make a permanent change, but it won't take effect until you reboot or use the hostname command.

There are also curses based programs that will do both, eg "netconf" without really having to use the commandline.
bmason (508)
1