Use the net-tools ifconfig command to list interfaces, including those that are down.
Do not change configuration.
Which command is appropriate?
ifconfig without arguments commonly shows active interfaces; -a includes interfaces that are down.
Detailed explanation
ifconfig -aCorrect. It lists all interfaces, including down interfaces.
Correct. It lists all interfaces, including down interfaces.
ifconfig upIncorrect. It treats up as an interface name rather than requesting an all-interface listing.
Incorrect. It treats up as an interface name rather than requesting an all-interface listing.
ifconfig --routeIncorrect. ifconfig has no standard --route listing option.
Incorrect. ifconfig has no standard --route listing option.
ifconfig -nIncorrect. -n is not the standard option for listing all interfaces.
Incorrect. -n is not the standard option for listing all interfaces.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'ifconfig -a -> show all interfaces including down'Expected result
ifconfig -a -> show all interfaces including downKey points
- -a means all
- Include down interfaces
- Read-only operation
Notes
- Environment: net-tools ifconfigのoption対応表
- 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.