How to change hostname on CentOS or RHEL 7

Question: What is a proper way to change hostname on CentOS / RHEL 7 (permanently or temporarily)? In CentOS or RHEL, there are three kinds of hostnames defined: (1) static, (2) transient, and (3) pretty. The “static” hostname is also known as kernel hostname, which is initialized from /etc/hostname automatically at boot time. The “transient” […]
Continue reading…