Failed to start hostname.service: Unit hostname.service is masked.
This happened after hostname update, tried to do a sudo service hostname start.
Update the hostname in both /etc/hostname
file and /etc/hosts
file before running service hostname restart
.
On newer systems running systemd (e.g. Ubuntu 16.04), have to use:
sudo hostnamectl set-hostname new-host-name
. In here, edit new-host-name
with your host name.