CentOSでネットワーク系コマンドを実行する
目的
LPIC102のネットワーク管理の勉強のため、netstatコマンドとかを打ちたい。最小構成ではインストールされていない。
手順
1 netstat打とうとしたら失敗。
[root@localhost ~]# netstat -bash: netstat: command not found
[root@localhost ~]# yum search netstat Loaded plugins: fastestmirror Loading mirror speeds from caches hostile * base: ftp.nara.wide.ad.jp * extras: ftp.jaist.ac.jp * updates: mirror.0x.sg ============== Matched: netstat ========= stat.noarch : Versatile resource statics tool net-snap.x86_64 : A collection of SNMP protocol tools and libraries net-tools.x86_64 : Basic networking tools
3 ググった結果、net-toolsでいいらしい。ただし、参考URLによるとnetstatは非推奨らしく、iproute2を使ったほうがいいのか?
CentOS7から、ifconfigやarp、netstatなどのよく利用しているネットワーク系のコマンドが非推奨となり、iproute2に置き換わってます。
4 ひとまずnet-toolsをインストールしておわり。
yum install net-tools