Ubuntu

Revision as of 07:54, 31 August 2023 by Mhan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Change hostname without a restart

  • Last tested on Ubuntu 16.04 (2018-04-23)
  1. To permanently change the computer name
    Edit /etc/hostname and /etc/hosts
  2. Restart hostname service
    $ systemctl restart systemd-logind.service
    
  3. Use hostnamectl with set-hostname flag.
    $ hostnamectl set-hostname NEW_NAME_HERE
    


Version specific