LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 12-11-2007, 12:22 AM   #1
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 209

Rep: Reputation: 30
changing hostname


I changed my hostname. in /etc/sysconfig/network I have this line:

NETWORKING=yes
HOSTNAME=blag
GATEWAY=192.168.0.1

and this is from my /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 blag localhost.localdomain localhost



is that fine ?
 
Old 12-11-2007, 12:23 AM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
That is fine. You may want to reboot and check that the hostname takes effect. To take effect now, you can just type in the command line
Code:
hostname blag
 
Old 12-11-2007, 12:45 AM   #3
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,262

Rep: Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561
Also check if you have an /etc/HOSTNAME file. You may need to edit that as well if your system uses it.
 
Old 12-11-2007, 01:02 AM   #4
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 209

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jschiwal View Post
Also check if you have an /etc/HOSTNAME file. You may need to edit that as well if your system uses it.
No.. but I do have a /bin/hostname binary file.
 
Old 12-11-2007, 01:21 AM   #5
deadeyes
Member
 
Registered: Aug 2006
Posts: 491

Rep: Reputation: 47
Quote:
Originally Posted by arnuld View Post
No.. but I do have a /bin/hostname binary file.
Thats an executable.

Check for /etc/hostname (all lower-case) (as root)
 
Old 12-12-2007, 12:20 AM   #6
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 209

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by deadeyes View Post
Thats an executable.

Check for /etc/hostname (all lower-case) (as root)

nothing like that:
[root@blag arnuld]$ ls /etc/ | grep hostname
[root@blag arnuld]$ ls /etc/ | grep host
ghostscript
host.conf
hosts
hosts~
hosts.allow
hosts.deny
[root@blag arnuld]$
 
Old 12-12-2007, 04:34 PM   #7
deadeyes
Member
 
Registered: Aug 2006
Posts: 491

Rep: Reputation: 47
Quote:
Originally Posted by arnuld View Post
nothing like that:
[root@blag arnuld]$ ls /etc/ | grep hostname
[root@blag arnuld]$ ls /etc/ | grep host
ghostscript
host.conf
hosts
hosts~
hosts.allow
hosts.deny
[root@blag arnuld]$
Create the file and put the hostname in it.

You are using ArchLinux right?
 
Old 12-13-2007, 04:43 AM   #8
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 209

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by deadeyes View Post
Create the file and put the hostname in it.

You are using ArchLinux right?
I have Arch but this specific question is not about Arch. I am dual-booting it with other OS, just look at my BASH prompt to know the name ;-)

file, in CAPS like /etc/HOSTNAME or simply /etc/hostname
 
Old 12-13-2007, 05:28 AM   #9
deadeyes
Member
 
Registered: Aug 2006
Posts: 491

Rep: Reputation: 47
Quote:
Originally Posted by arnuld View Post
I have Arch but this specific question is not about Arch. I am dual-booting it with other OS, just look at my BASH prompt to know the name ;-)

file, in CAPS like /etc/HOSTNAME or simply /etc/hostname
lowercase (all files in /etc are lowercase)
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hostname keeps changing zulfinho Linux - Newbie 3 01-16-2006 04:32 AM
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


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

Main Menu
 
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
Open Source Consulting | Domain Registration