1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Raspberry PiのUbuntu 22.04 LTSでホスト名を変更できない事象の解決方法

Posted at

起きたこと

sudo hostnamectl set-hostname <新ホスト名>

でホスト名を変えてみたものの、再起動するとホスト名が変更前に戻ってしまう。

解決方法

/boot/firmware/user-dataにあるhostnameの値を<新ホスト名>に変更して保存し、再起動する。

/boot/firmware/user-data
hostname: <新ホスト名>
...
...

この方法で新しいホスト名を使えます🎉

ちなみに、/etc/hostsも起動時に自動で変更してくれます。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?