📜  界面向上向下 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:35.982000             🧑  作者: Mango

代码示例1
2. Bringing interfaces up/down
Two methods can be used to bring interfaces up or down.

2.1. Using "ip"
Usage:

# ip link set dev  up
# ip link set dev  down
Example:


# ip link set dev eth0 up
# ip link set dev eth0 down
2.2. Using "ifconfig"
Usage:

# /sbin/ifconfig  up
# /sbin/ifconfig  down
Example:

# /sbin/ifconfig eth0 up
# /sbin/ifconfig eth0 down