LoginSignup
3
2

More than 3 years have passed since last update.

nmcli でよく使うコマンドまとめ

Last updated at Posted at 2019-10-06

CentOS 7 で確認。nmcli のバージョンは 1.18.0-5.el7_7.1。

ホスト名を変更

nmcli general hostname <ホスト名>

nmcli g h <ホスト名> でもよい。

ネットワークデバイスの状態を表示

nmcli device status

nmcli d でもよい。

定義されている接続のリストを表示

nmcli connection show

nmcli c s でもよい。

接続の詳細を表示

nmcli connection show <接続ID>

nmcli c s <接続ID> でもよい。
特定のセクションを表示するには、-f <セクション> をつける。

接続

nmcli connection up <接続ID>

nmcli c u <接続ID> でもよい。
接続がすでに有効になっている場合、切断してから再接続する。

切断

nmcli connection down <接続ID>

nmcli c d <接続ID> でもよい。

接続の詳細を変更

nmcli connection modify <接続ID> <設定名> <設定値>

nmcli c m <接続ID> <設定名> <設定値> でもよい。
設定を追加/削除する場合は設定名の前に+/-をつける。

3
2
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
3
2