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 固定IPアドレス設定(Raspberry Pi OS Lite - bookworm)

Last updated at Posted at 2024-12-01

結論  少なくともbookwormでは

sudo nmtui

でグラフィカルで簡単・直感的に設定ができるようになっている
(例としてWi-Fiで繋いだラズパイを固定IP化している)
image.png
image.png
image.png
※preconfiguredはRaspberry Pi ImagerであらかじめWi-Fiの設定を仕込むと自動的にこの名前にしてくれる
※最初はIPv4 CONFIGURATIONがになっているために変更
※この記事を書いたラズパイのイメージは 2024-11-19-raspios-bookworm-arm64-lite.img.xz
 から作成したもの。ハードはRaspberry Pi 4B。

どうしてもCLIでキーボードをタカタカしたい人は

sudo nmcli connection show
 →接続プロファイル一覧を確認
 
sudo nmcli connection modify ‘接続プロファイル名’ ipv4.method manual ipv4.addresses 固定したいIPアドレス/ビットマスク ipv4.gateway デフォゲ ipv4.dns DNS鯖

sudo nmcli connection reload
sudo nmcli connection up ‘接続プロファイル名’

でも可。圧倒的手数の多さ。

今までは…

最後にRaspberry Pi OSを触ったのがだいぶ昔となってしまうが、
Raspbian busterあたりまでは

/etc/dhcpcd.conf

/etc/network/interfaces

の中にゴリゴリと設定を書いていく方式だった。

所感

balenaEtcherやRufusではなくRaspberry Pi Imagerが使いやすくなっていたり
上記のようにRaspberry Pi OSの中も便利になっていっているなぁ…と感じた。

思い立って久々にラズパイを押し入れから引っ張り出し、浦島太郎の気持ちになったので備忘録として残す。
2023年位からラズパイを触っておらず、久々に触る人が「/etc/dhcpcd.confがない!」となったときに読んでいただきたい。

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?