109.3基礎
net-toolsのifconfigを使い、up状態だけでなく停止中のinterfaceも含めて一覧表示する。
設定は変更しない。
適切なコマンドはどれか。
× 不正解
legacy ifconfigは引数なしでは通常up状態のinterfaceを表示し、-aでdown状態も含める。
詳細解説
正しい
ifconfig -a停止中を含む全interfaceを表示する。
正しい。-aはallの意味で、通常表示から漏れるdown状態のinterfaceも含めて確認できる。
誤り
ifconfig upupというinterface名を表示・操作する形になり全一覧ではない。
誤り。ifconfigの後のupは全体表示optionではなく、interface名や設定parameterの位置にある。
誤り
ifconfig --routerouting table一覧を表示するifconfig optionではない。
誤り。ifconfigはinterface設定用で、routing tableの表示にはroute -n等を使う。
誤り
ifconfig -n全interface表示を表す標準的なifconfig optionではない。
誤り。ifconfigで停止中を含む全一覧を表すoptionは-nではなく-aである。
実際に確かめる
一時的な検証環境で実行できる例です。
printf '%s
' 'ifconfig -a -> show all interfaces including down'期待される結果
ifconfig -a -> show all interfaces including down理解のポイント
- -aはall
- down interfaceも対象
- 読取操作
確認時の注意
- 確認環境: net-tools ifconfigのoption対応表
基礎のおさらい
legacy tool
ifconfigはnet-tools由来で、現行Linuxではip linkとip addressが同等情報の主な代替になる。
flagの読取
UP、RUNNING等とaddress、netmask、packet counterを分けて障害位置を考える。
問題IDKP-109-825
確認環境net-tools ifconfigのoption対応表
最終技術確認2026-08-13
誤り・権利侵害を報告