LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2004, 11:16 AM   #1
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Rep: Reputation: 30
How do I change the hostname of my computer?


How do I change the hostname of my computer?

I've heard /etc/rc.d/rc.sysinit does it, but I don't seem to have that file. I also read the manual page for hostname and it says that the hostname is usually set once at system startup in /etc/rc.d/rc.inet1 or /etc/init.d/boot but I don't have either of these files.

So how do I change it? I'm running Debian, by the way, but I'm not sure if this is really that distro specific so I'm posting this here instead of the Debian Forum.

I don't have a hostname at the moment. all it says is user@(none) which is not too cool.

Thanks.
 
Old 07-18-2004, 11:20 AM   #2
1kyle
Member
 
Registered: Feb 2004
Location: 'Ol Blighty
Distribution: SLED 10, SUSE 10.3
Posts: 722

Rep: Reputation: 32
I'm sure you can do it when you set up your LAN cards ( static IP / DHCP / Hostnames, DNS, Routing)

In SUSE it's all done in YAST but I'm sure other distros have a LAN configuration utility.
 
Old 07-18-2004, 11:28 AM   #3
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Do you have a /etc/HOSTNAME ?

$ cat /etc/HOSTNAME

If you do, you can just type

# yourhostname > /etc/HOSTNAME

:)
 
Old 07-18-2004, 11:58 AM   #4
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Nope, don't have an /etc/hostname or /etc/HOSTNAME. I'll try and create one, though, with the hostname I want and reboot. I'll post in a few minutes if this works or not.

Thanks.

By the way, in your hostname file. Is there anything else besides your hostname?

Last edited by atheist; 07-18-2004 at 12:01 PM.
 
Old 07-18-2004, 12:34 PM   #5
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
It worked. Creating /etc/hostname and simply typing in my hostname (rakka).

Thanks.
 
  


Reply



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
Ping a computer in LAN using hostname seven Linux - Networking 3 07-05-2003 10:42 PM
Hostname/computer name Brad3d Linux - General 1 01-12-2003 02:02 PM
naming your computer (hostname) sitrus Linux - General 4 09-07-2002 03:09 PM
Hostname of computer Kaiser_Sose Linux - Networking 2 02-04-2002 05:45 PM
Hostname of computer Kaiser_Sose Linux - Software 3 01-26-2002 08:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:46 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
Open Source Consulting | Domain Registration