cheatsheet/nmcli
Posted: | Categories: cheatsheet | Tags: cheatsheet, nmcli
| 効果 | コマンド |
|---|---|
| デバイスの一般的な確認(wifiなど) | nmcli general status |
| デバイス名と状態 | nmcli dev status |
| wifi の状態 | nmcli radio wifi |
| アクセスポイント探す | nmcli dev wifi list |
| wifi 接続 | nmcli d wifi connect <ssid> password <pass> ifname <interface_name> |
| wifi 切断 | nmcli d wifi disconnect ifname <interface_name> |
| 自動接続の on/off | nmcli connection mod <connection_name> connection.autoconnect <yes/no> |
| wifi の on/off | nmcli radio wifi <on/off> |
| wifi アクセスポイントの再スキャン | nmcli dev wifi rescan |
| 利用可能なコネクションのリスト | nmcli con |
| アクティブなコネクション | nmcli con show –active |
| 接続 | nmcli con add type ethernet con-name <name> ifname <iface_name> |
| イーサネット接続を有効に | nmcli con up <name> |
| ブリッジの追加 | nmcli con add type bridge con-name br0 ifname br0 |
| ブリッジの情報 | nmcli con show br0 | grep -e ipv4.method -e ipv4.addresses -e ipv4.gateway |
| IP アドレス設定 | nmcli connection mod eth2 ipv4.method manual ipv4.addresses “192.0.2.2/24” |
| IP アドレスとゲートウェイの設定 | nmcli con mod br0 ipv4.method manual ipv4.address 192.0.2.0/16 ipv4.gateway 192.0.2.1 |
| 物理デバイス追加 | nmcli con add type bridge-slave con-name bridge-slave-snp0s9 ifname enp0s9 master br0 |
nmcli のオプション
Read more...