[CentOS] hostname on centos 7.1

Tue Apr 21 13:23:26 UTC 2015
Scott Robbins <scottro at nyc.rr.com>

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