Download a free virtual machine for your application and start developing right away! You could save hours installing packages or grappling with config files.
Setting hostname on Fedora 18
![admin's picture admin's picture](http://devopera.com/sites/52_devop7/files/pictures/picture-1-1337199643.png)
Submitted by admin on Fri, 02/15/2013 - 17:36
![](../sites/52_devop7/files/field/image/fedora-hat.jpg)
Setting hostname on Fedora 18 permanently, from command line, turned out to be trickier than I thought it would be.
hostname <name> will only set the hostname temporarily (until the next restart). Unlike older Redhat/CentOS peers, editing /etc/sysconfig/network and adding a 'HOSTNAME=' directive is ineffective. sysctl kernel.hostname=NEW_HOSTNAME is also only temporary. This is because the hostname is now stored in /etc/hostname.
hostnamectl set-hostname <name> --pretty
hostnamectl set-hostname <name>.<localdomain> --static
will set it permanently.
Hat image attributed to http://www.flickr.com/photos/puuikibeach/4959026655/, CC Flickr