Stop enp1s0 using the distribution's network configuration.
Use ifdown.
Which command is appropriate?
ifdown INTERFACE stops the configured interface. Be careful when the interface carries your remote connection.
Detailed explanation
ifup enp1s0Incorrect. ifup starts the interface.
Incorrect. ifup starts the interface.
ifdown enp1s0Correct. ifdown enp1s0 stops the configured interface.
Correct. ifdown enp1s0 stops the configured interface.
ip address show enp1s0Incorrect. ip address show only displays address information.
Incorrect. ip address show only displays address information.
nmcli device status enp1s0Incorrect. nmcli device status displays status and does not stop the device.
Incorrect. nmcli device status displays status and does not stop the device.
Try it yourself
An example you can run in a temporary verification environment.
command -V ifdown 2>/dev/null || printf '%s
' 'ifdown is not installed'Expected result
ifdownのコマンド情報、または未導入を示すメッセージKey points
- ifdown stops an interface
- ifup starts it
- Remote sessions may disconnect
Notes
- Environment: POSIX shell / 状態変更なし
- 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.