PDA

View Full Version : change hostname?



Valhalla
03-25-2004, 02:26 PM
I have just installed knoppix on my hard drive and I am fumbling around trying to figure out how things work. There is a bug that wouldn't let me name my computer what I wanted during setup (wouldn't let me erase all of the default text in the box) so at the end of my host name there is an x. Can someone enlighten me as to how I can change the host name of my computer?

c123
03-25-2004, 02:44 PM
You can do it from the shell using 'hostname' (hostname name_you_want - see man hostname for more info/options).

To set it permanently, have a look at /etc/hostname and /etc/resolv.conf

Valhalla
03-25-2004, 04:48 PM
Thanks for the help, so much to learn, I have been up for 2 days playing with this os; it's addictive.

Stephen
03-25-2004, 07:53 PM
Make sure that you get all the files where the hostname is with something like this.



HappyTux:/home/stephen# grep -r HappyTux /etc/*
grep: /etc/alternatives/x-session-manager: No such file or directory
grep: /etc/cups/pdftops.conf: No such file or directory
/etc/exim/exim.conf:qualify_domain = HappyTux
/etc/exim/exim.conf:local_domains = HappyTux:localhost
/etc/hostname:HappyTux
/etc/hosts:192.168.0.1 HappyTux
/etc/mailname:HappyTux
/etc/mailname.O:HappyTux
/etc/motd:Linux HappyTux 2.6.4 #1 Sat Mar 13 05:45:50 AST 2004 i686 GNU/Linux
/etc/motd.old:Linux HappyTux 2.4.20-bf2.4 #1 Sun Mar 9 07:22:41 UTC 2003 i686 unknown

[snip ssh keys]