Ubuntu: Difference between revisions
iwu |
use template for lasted tested on |
||
Line 1: | Line 1: | ||
= Change hostname without a restart = | = Change hostname without a restart = | ||
{{testedon|2018-04-23|Ubuntu 16.04}} | |||
# To '''permanently''' change the computer name<br>Edit <code>/etc/hostname</code> and <code>/etc/hosts</code> | # To '''permanently''' change the computer name<br>Edit <code>/etc/hostname</code> and <code>/etc/hosts</code> |
Revision as of 13:51, 3 January 2019
Change hostname without a restart
- Last tested on Ubuntu 16.04 (2018-04-23)
- To permanently change the computer name
Edit/etc/hostname
and/etc/hosts
- Restart hostname service
$ systemctl restart systemd-logind.service
- Use hostnamectl with set-hostname flag.
$ hostnamectl set-hostname NEW_NAME_HERE