0
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?

More than 1 year has passed since last update.

【2022年版】 ネットワークインターフェースの有効/無効化

Posted at

【2022年版】 ネットワークインターフェースの有効/無効化

はじめに

  • ネットワークインターフェイスの有効/無効化をしたい
  • 対象ネットワークインターフェイスは eth0 とする

概要

  • 以下のコマンドを使う
    • ifconfig
    • ifdown
    • ifup
    • ip link set
    • nmcli connection

使用例

ifconfig

  • 有効化

    $ ifconfig eth0 up
    
  • 無効化

    $ ifconfig eth0 down
    

ifup

  • 有効化

    # ifup eth0
    

ifdown

  • 無効化

    $ ifdown eth0
    

ip link set

  • 有効化

    $ ip link set eth0 up
    
  • 無効化

    $ ip link set eth0 down
    

nmcli connection

  • 有効化

    $ nmcli connection up eth0
    
  • 無効化

    $ nmcli connection down eth0
    

おわりに

  • かんたんでしたね
0
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
0
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?