LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-05-2009, 03:39 PM   #1
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Rep: Reputation: 30
Assign Static Hostname in Ubuntu Server


How do I assign a static hostname in Ubuntu server?

I need this one static so when I reboot the server it doesnt change to default locahost.

Please advise.

Thanks!
DB
 
Old 08-05-2009, 03:46 PM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,240

Rep: Reputation: 132Reputation: 132
edit your /etc/hosts and add
ipaddress hostname

edit the /etc/sysconfig/network
HOSTNAME=hostname
 
Old 08-05-2009, 03:46 PM   #3
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
On Debian you can set it in /etc/hostname . Should be the same in Ubuntu.
 
Old 08-05-2009, 05:01 PM   #4
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by makuyl View Post
On Debian you can set it in /etc/hostname . Should be the same in Ubuntu.
/etc/hostname is the right path for ubuntu server.

You resolved my issue.

Thank you mate!

Cheers,
DB
 
  


Reply

Tags
hostname, server, static, ubuntu


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
How do I assign a static IP address to a DHCP server? Cyberman Linux - Networking 6 01-29-2010 04:47 PM
How to assign a static IP freak_vss Linux - Networking 4 08-26-2008 09:03 PM
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 11:51 AM
assign static ip allelopath Linux - Software 1 04-27-2005 08:04 PM
assign static IP to the server ashley75 Linux - General 2 03-10-2005 04:47 PM


All times are GMT -5. The time now is 11:27 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