Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 06-13-2005, 09:54 AM   #1
Registered: Feb 2005
Posts: 74

Rep: Reputation: 15
changing hostname

Current Debian Sarge

I have unsuccesfully trying to chang ethe hostname for w hile now. Most references I find through google either refer to /etc/sysconfig/network (hwich doenst exist I guess for Debia) and the command hostname also changes it only temporarily. I tried editing the /etc/hosts file
which displays localhost.localdomain localhost matrix

(yeah I know the hostname is matrix I just didnt feel like being creative)
and I know I am supposed to chang ethe last part which I guess is supposed to refer to the hostname, but even after changing that and a reboot the hostname has not changed. Could somebody please hlep change this? Thanks!
Old 06-13-2005, 10:06 AM   #2
LQ Newbie
Registered: Jun 2005
Posts: 5

Rep: Reputation: 0
There are two simple things you can do to change your system's hostname.
First, use the hostname program, it can set the hostname as well as reading it.
Just type:

That change is non-persistant though (it goes away when you reboot).
You can edit /etc/hostname to make that change permanant.
Old 06-13-2005, 10:12 AM   #3
Dead Parrot
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
You can also change your hostname in "base-config" (you need to "su" to root first).
Old 06-13-2005, 10:29 AM   #4
Registered: Feb 2005
Posts: 74

Original Poster
Rep: Reputation: 15
edit /etc/hostname

I was being stupid I guess. I forgot you could edit /etc/hostname, I kept thinking you culdnt edit a program or something. Thanks for the help!
Old 06-14-2005, 10:45 AM   #5
Registered: Dec 2004
Location: Central New York
Distribution: Debian
Posts: 218

Rep: Reputation: 30
You can also install the etherconf package. That will allow you to control the the host and network info with debconfig.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
hostname changing rusty_slacker Linux - General 2 04-15-2005 06:49 PM
hostname changing Baracuda Linux - General 4 04-04-2005 08:07 AM
Changing hostname? Alf829 Linux - Networking 2 03-08-2004 08:31 AM
Hostname changing Neorio Linux - Networking 2 01-03-2004 07:11 PM
Changing hostname tristan2600 Linux - Newbie 1 10-17-2003 08:18 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration