Return enp1s0 from administrative DOWN to UP with iproute2.
Do not add an IP address.
Which command is appropriate?
ip link set dev INTERFACE up changes the administrative link state. Carrier, addresses, and routes must be checked separately.
Detailed explanation
ip address add up dev enp1s0Incorrect. This is not valid address syntax.
ip route add up dev enp1s0Incorrect. It does not change link state and treats up as a route value.
ip link show dev enp1s0 upIncorrect. show only inspects the link.
ip link set dev enp1s0 upCorrect. It sets enp1s0 administratively up.
Try it yourself
An example you can run in a temporary verification environment.
ip link help 2>&1 | sed -n '1,6p'Expected result
ip link setのup、downなどの構文概要Key points
- link set
- Select the device with dev
- up is the administrative state
Notes
- Environment: iproute2 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.