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.
ifconfig -a enp1s0Incorrect. -a displays all interfaces.
ifdown --show enp1s0Incorrect. This is not the standard ifconfig stop syntax.
route del enp1s0Incorrect. 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
Interface counters
Kernel-maintained counts of packets, errors, and drops at an interface.
Socket
A local or remote endpoint associated with a transport protocol and process.
Path tracing
A diagnostic method that observes hops and path limits toward a destination.