[CentOS] hostname on centos 7.1

Thu Apr 23 04:28:06 UTC 2015
Martes <mailinglistmember at mgwigglesworth.net>

Greetings everyone.

I have some CentOS 7 VMs running on the system for which I just made the inquiry about the kworker problem, and I was able to institute immediate change of hostname by updating the /etc/hostname file.

I have network manager running on the host, as well, and it also has the name populated in this file.

When I make the change in /etc/hostname, it takes immediate effect, and persists across reboots, just as with /etc/sysconfig/network prior to RHEL/CentOS 7.

If my input is out of context, then I apologize for the confusion.  

(I have vlans attached to the gigabit Ethernet cable, which is used to service the exposed VMs, and I use the wireless adaptor for all other internet and lan usage, hence my use of network manager on the desktop being assumed to be relevant to this inquiry.)

Respectfully, 

Martes G Wigglesworth

----- Original Message -----
From: "Scott Robbins" <scottro at nyc.rr.com>
To: "centos" <centos at centos.org>
Sent: Tuesday, April 21, 2015 9:23:26 AM
Subject: Re: [CentOS] hostname on centos 7.1

On Tue, Apr 21, 2015 at 08:43:15AM -0400, Jerry Geis wrote:
> I have a file /etc/sysconfig/network and in the file is
> 
> cat  /etc/sysconfig/network
> # Created by anaconda
> HOSTNAME=zotac_c7.msgnet.com
> [root at localhost ~]#
> 
> I rebooted and the prompt is still localhost ?
> 
> What is the new thing in CentOS 7 to set the host name
> such that then the prompt is correct also?

hostnamectl set-hostname --static c7.msgnet.com  


Without the static option, I think it leaves out the periods in the name.

-- 
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

_______________________________________________
CentOS mailing list
CentOS at centos.org
http://lists.centos.org/mailman/listinfo/centos