Help us understand the problem. What is going on with this article?

Linuxチートシート|ネットワーク設定編

More than 1 year has passed since last update.

Linuxの学習メモをチートシートとして残します。

メモ

  • RHEL7系ではネットワーク管理はNetworkManagerの利用を推奨
  • 従来のifconfigなどを利用する場合は要インストール

チートシート

# ネットワークを有効化
$ nmcli networking on

# ネットワークを無効化
$ nmcli networking off

# NetWorkManagerの状態を確認
$ nmcli general status

# デバイスとコネクションの接続状態を確認する
$ nmcli device status

# デバイスを接続
$ nmcli device connect DEVICENAME

# デバイスを切断
$ nmcli device disconnect DEVICENAME

# ホスト名を変更
$ nmcli general hostname HOSTNAME

# コネクションを確認
$ nmcli connection show

# コネクションを有効化
$ nmcli connection up CONNECTIONNAME

# コネクションを無効化
$ nmcli connection down CONNECTIONNAME

# コネクションのIPアドレスを変更
$ nmcli connection modify CONNECTIONNAME ipv4.addresses IPADDRESS

# デバイスにコネクションを追加
$ nmcli connection add type ethernet con-name CONNECTIONNAME ifname DEVICENAME

# デバイスからコネクションを削除
$ nmcli connection delete CONNECTIONNAME

# ホスト名を確認
$ hostname

# ホスト名を変更(専用コマンド)
$ hostnamectl set-hostname HOSTNAME

# ホスト名を確認(専用コマンド)
$ hostnamectl status

# ICMPパケットを5回送信
$ ping -c5 IPADDRESS

# ソケットの統計情報を確認
$ ss

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away