LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Thread Tools
Old 12-11-2007, 01:22 AM   #1
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 204
Thanked: 0
changing hostname


[Log in to get rid of this advertisement]
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 ?
arnuld is offline     Reply With Quote
Old 12-11-2007, 01:23 AM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.5.5, Windows 2003 Server/Vista/XP/2000/NT/98, Ubuntux64, CentOS4.7/5.2
Posts: 2,980
Thanked: 0
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
Micro420 is offline     Reply With Quote
Old 12-11-2007, 01:45 AM   #3
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 12,877
Thanked: 232
Also check if you have an /etc/HOSTNAME file. You may need to edit that as well if your system uses it.
jschiwal is offline     Reply With Quote
Old 12-11-2007, 02:02 AM   #4
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 204
Thanked: 0

Original Poster
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.
arnuld is offline     Reply With Quote
Old 12-11-2007, 02:21 AM   #5
deadeyes
Member
 
Registered: Aug 2006
Posts: 260
Thanked: 3
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)
deadeyes is offline     Reply With Quote
Old 12-12-2007, 01:20 AM   #6
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 204
Thanked: 0

Original Poster
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]$
arnuld is offline     Reply With Quote
Old 12-12-2007, 05:34 PM   #7
deadeyes
Member
 
Registered: Aug 2006
Posts: 260
Thanked: 3
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?
deadeyes is offline     Reply With Quote
Old 12-13-2007, 05:43 AM   #8
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 204
Thanked: 0

Original Poster
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
arnuld is offline     Reply With Quote
Old 12-13-2007, 06:28 AM   #9
deadeyes
Member
 
Registered: Aug 2006
Posts: 260
Thanked: 3
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)
deadeyes is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 keeps changing zulfinho Linux - Newbie 3 01-16-2006 05:32 AM
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 01:48 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration