Set the administrative link state of enp1s0 to up.
Do not add an IP address or edit a NetworkManager profile.
Which command is appropriate?
ip link set dev enp1s0 up changes the runtime link state without creating an address or persistent profile.
Detailed explanation
ip address add up dev enp1s0Incorrect. address add does not accept up as an interface-state operation.
Incorrect. address add does not accept up as an interface-state operation.
ip route add dev enp1s0 upIncorrect. route add creates a route rather than changing link state.
Incorrect. route add creates a route rather than changing link state.
ip link show dev enp1s0 upIncorrect. show only displays state; set is needed to change it.
Incorrect. show only displays state; set is needed to change it.
ip link set dev enp1s0 upCorrect. It sets the administrative state of enp1s0 to up.
Correct. It sets the administrative state of enp1s0 to up.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'ip link set dev enp1s0 up -> administrative state UP'Expected result
ip link set dev enp1s0 up -> administrative state UPKey points
- Use link set
- Select with dev
- up is a runtime state
Notes
- Environment: 操作対応表の表示のみ
- 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.