How to change the hostname of your Linux machine without needing to restart

Image of a terminal prompt

hostnamectl method Since Ubuntu 16.04 (and most recent Linux distros) use Systemd you can simply use the hostnamectl command to change hostname. To see current setting, run your Terminal just type the following command: $ […]