Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to change Host name in RH Linux

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 01-04-2010
Member
 
Join Date: Mar 2010
Posts: 61
How to change Host name in RH Linux
  

Hi,
I installed Red Hat Linux and need to change the Host name using linux command line way .when i newly installed and configured, it displayed as - [root@localhost root]#

This was the default provided by system, can you all help me chnage this in the following format - [root@pc1 root]#

Is there any way to change host name?


Last edited by Morea : 01-04-2010 at 06:08 PM.
Reply With Quote
  #2  
Old 01-04-2010
Member
 
Join Date: Apr 2008
Posts: 3,516
How to change Host name in RH Linux

Why not, This is very simple procedure to change it from the command line argument and you have to restart the computer to get the changes after issuing command from the command line argument :


Code:
#hostname Desired_Name
It is possible in case only, if you are the root user of the linux system and update theses changes in network file also.
Reply With Quote
  #3  
Old 01-04-2010
Member
 
Join Date: Apr 2008
Posts: 3,292
How to change Host name in RH Linux

For permanent changes in the configuration of linux host name, you need to have the privilege of root user and open up the network file from the following location in Vi editor -

Code:
[root@localhost root]#cd  /etc/sysconfig/
            [root@localhost root]# vi network
And edit the following parameter with proper information in the configuration file for host related queries by the system -

Network type :
Hostname :
Gateway :
Reply With Quote
  #4  
Old 01-04-2010
Member
 
Join Date: Mar 2010
Posts: 61
How to change Host name in RH Linux

Hello sir,

I issued the command and edit the network configuration file and then restart Linux computer. After all of the operation, it is abusing me like -

"Could not look up internet address for PC1.localdomain.
This will prevent GNOME from opening correctly.
it may be possible to correct the problem by adding PC1.localdomain to the file /etc/host.


Any other procedure or trick to solve this or my PC is going to corrupt. Please help me
Reply With Quote
  #5  
Old 01-04-2010
Member
 
Join Date: Nov 2005
Posts: 3,025
How to change Host name in RH Linux

hello dear,

You are about to change the host name, something is going to left. You need to edit the hosts file also located in /etc/hosts.

Just open it with vi and fill the appropriate value for the dedicated parameter and in case if the old name is already tagged there then replace the old host name and fill up your new host name. Now save the changes and restart your PC. The error would not be displayed for you.

Thanks
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to change Host name in RH Linux"
Thread Thread Starter Forum Replies Last Post
Brink Agents of Change: Waiting For Host Dead-Man Video Games 7 07-08-2011 11:02 PM
How to change host browser in CloudMe? Iason Technology & Internet 3 14-06-2011 06:09 AM
Which Linux should be used to host a database on a notebook? Ferdinand Alosa Operating Systems 4 19-01-2011 02:20 PM
Need to change website host sonuinfy Networking & Security 1 15-11-2010 11:39 PM
Linux or Windows Host for these multiple programming languages Rock Villa Software Development 3 16-03-2009 05:32 PM


All times are GMT +5.5. The time now is 07:05 AM.