Use net-tools ifconfig to administratively disable enp1s0.
Do not edit configuration files.
Which command is appropriate?
ifconfig INTERFACE down clears the interface's UP flag. An active remote session through that interface may be lost immediately.
Detailed explanation
ifconfig enp1s0 downCorrect. It administratively brings enp1s0 down.
Correct. It administratively brings enp1s0 down.
ifconfig -a enp1s0Incorrect. -a displays all interfaces.
Incorrect. -a displays all interfaces.
ifdown --show enp1s0Incorrect. This is not the standard ifconfig stop syntax.
Incorrect. This is not the standard ifconfig stop syntax.
route del enp1s0Incorrect. A route operation does not directly change link state.
Incorrect. A route operation does not directly change link state.
Try it yourself
An example you can run in a temporary verification environment.
ifconfig --help 2>&1 | sed -n '1,8p' || printf '%s
' 'ifconfig is not installed'Expected result
ifconfigの使用方法、または未導入メッセージKey points
- down stops the interface
- It changes link state
- Beware remote disconnection
Notes
- Environment: net-tools ifconfig help / 状態変更なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.