LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 06-13-2005, 10:54 AM   #1
sh4d0w13
Member
 
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

127.0.0.1 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, 11:06 AM   #2
AdamJacobMuller
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:
hostname mysystem.mydomain.com

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, 11: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, 11:29 AM   #4
sh4d0w13
Member
 
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, 11:45 AM   #5
rbochan
Member
 
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.
 
  


Reply


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 07:49 PM
hostname changing Baracuda Linux - General 4 04-04-2005 09:07 AM
Changing hostname? Alf829 Linux - Networking 2 03-08-2004 09:31 AM
Hostname changing Neorio Linux - Networking 2 01-03-2004 08:11 PM
Changing hostname tristan2600 Linux - Newbie 1 10-17-2003 09:18 PM


All times are GMT -5. The time now is 02:31 PM.

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