LinuxQuestions.org
Visit Jeremy's Blog.
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 05-13-2012, 04:12 AM   #1
rohitkanojia
LQ Newbie
 
Registered: May 2012
Posts: 7

Rep: Reputation: Disabled
Talking How to change host name permanently in CentOS 6.2 ?


I install CentOS 6.2 in text mode, during installation hostname option didn't appear.Now it show "localhost" as host name, how it can be permanently, because i use "hostname newhostname" command but after reboot system it change back to "localhost".

Last edited by rohitkanojia; 05-13-2012 at 04:13 AM.
 
Old 05-13-2012, 04:53 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
It should be in /etc/sysconfig/network - you just need to change the 'HOSTNAME' variable there.
 
Old 05-13-2012, 12:20 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
http://www.ehowstuff.com/how-to-chan...os-6-2-server/

Might wish to edit host file too.
 
Old 05-14-2012, 12:17 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,622

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you installed it in TEXT ONLY mode so no GUI

nano is installed by default
-- normal non root user---
Code:
su -
nano /etc/sysconfig/network
VI might be

you might also want to install MC ( midnight Commander)

so a text install

did you make a NORMAL user account ( adduser) or are you running as root ( if so BAD idea for most things)
 
  


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
[SOLVED] How can i permanently mount a folder in centos jsaravana87 Linux - Server 4 09-16-2011 12:38 AM
[SOLVED] how to change permanently a script in etc joham34 Linux - Newbie 6 04-29-2010 07:52 AM
WinXP VM on VirtualBox CentOS Host - no response of host during install?! ascfu Linux - Software 1 12-10-2009 12:45 PM
can't change tcp_sack permanently kentri9 Linux - Networking 1 10-30-2004 05:20 PM
Permanently change the hostname juby Linux - Software 13 05-10-2003 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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