13,005
回編集
122行目: | 122行目: | ||
<br> | <br> | ||
==== CUIで設定する (推奨) ==== | ==== CUIで設定する (推奨) ==== | ||
===== Raspberry Pi OS Bookwormの場合 ===== | |||
sudo vi '/etc/NetworkManager/system-connections/Wired connection 1.nmconnection' | |||
<br> | |||
<syntaxhighlight lang="ini"> | |||
# /etc/NetworkManager/system-connections/Wired connection 1.nmconnectionファイル | |||
[connection] | |||
type=ethernet | |||
id=Wired connection 1 | |||
uuid=xxxx-xxxx-xxxx-xxxx-xxxx | |||
autoconnect=true | |||
interface-name=eth0 | |||
timestamp=1732023900 | |||
[ethernet] | |||
[ipv4] | |||
address1=<Raspberry PiのIPアドレス 例: 192.168.0.100>/<サブネットマスク 例: 24>,<デフォルトゲートウェイ 例: 192.168.0.1> # 任意の値 | |||
dns=<DNSのアドレス 例: 192.168.0.1>; # 任意の値 | |||
method=manual | |||
[ipv6] | |||
addr-gen-mode=stable-privacy | |||
#method=auto | |||
method=disabled # IPv6を無効化する場合 | |||
[proxy] | |||
</syntaxhighlight> | |||
<br> | |||
===== Raspberry Pi OS Bullseyeの場合 ===== | |||
まず、/etc/dhcpcd.confファイルの最下行に、以下の設定を追記する。<br> | まず、/etc/dhcpcd.confファイルの最下行に、以下の設定を追記する。<br> | ||
sudo vi /etc/dhcpcd.conf | sudo vi /etc/dhcpcd.conf |