---
# System prepended metadata

title: Ubuntu ホスト名の変更　2021-04-14
tags: [Ubuntu]

---

---
lang: ja-jp
breaks: true
---
# Ubuntu ホスト名の変更　2021-04-14

```shell=
$ hostnamectl set-hostname ubuntu-vm
==== AUTHENTICATING FOR org.freedesktop.hostname1.set-static-hostname ===
静的なホスト名を設定するには認証が必要です。
Authenticating as: xxxxxxxx,,, (xxxxxxxx)
Password:
==== AUTHENTICATION COMPLETE ===

$ hostname
ubuntu-vm

$ hostnamectl
   Static hostname: ubuntu-vm
         Icon name: computer-vm
           Chassis: vm
        Machine ID: f7f3814334be46e4b016979de7a8e91f
           Boot ID: b44824ae6dbb47a89f7cb75d9ff3b919
    Virtualization: microsoft
  Operating System: Ubuntu 20.10
            Kernel: Linux 5.8.0-49-generic
      Architecture: x86-64

```

###### tags: `Ubuntu`
