Solved

Linux, how to change hostname

Posted on 2012-03-22
1
381 Views
Last Modified: 2012-03-22
I am using RHEL 6.2

My machine gives appearance of thinking its running in 2 different hostname

I see host01 in the following file

/etc/sysconfig/network

But when I do a hostname it says host2

What are all the files where the hostname

Is there a single command to change the host name (and hence all the files where the hostname is stored)
0
Comment
Question by:Los Angeles1
1 Comment
 
LVL 11

Accepted Solution

by:
jgiordano earned 500 total points
ID: 37752983
have you changed the name in network and not rebooted?

if you do a hostname <newname> that will change it for everyone logging on from that point forward. A reboot will take whats in /etc/sysconfig/network
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now