Skip to main content

Posts

Showing posts from December, 2016

Change hostname Debian Linux

To permanently change the hostname of a Debian Linux machine, perform these steps: 1) nano /etc/hostname 2) nano /etc/hosts 3) /etc/init.d/hostname.sh start If the server has other things that requires update, such as mail server, be sure to edit the config files as well. For example, if there is Postfix, edit the following: /etc/mailname /etc/postfix/main.cf Then execute: /etc/init.d/postfix restart Update: Under Ubuntu Linux 16.04LTS with Aliyun (Alibaba Cloud), use: hostnamectl set-hostname "your FQDN" service hostname restart is not necessary in this case.