Get the App
SLTechnology News&Howtos  ›  Servers  › 

Encountered "- bash: netstat: command not found" in daily work

Shulou Source: shulou.com Published: 2022-06-02 07:37:45 10月04日 Update

1. The problems encountered are as follows:

[root@localhost ~] # netstat-anptu | grep mysql-bash: netstat: command not found

2. The solution is as follows:

[root@localhost ~] # yum-y install net-tools loaded plug-in: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com is resolving dependencies-- > checking transactions-- > software package net-tools.x86_64.0.2.0-0.25.20131004git.el7 will be installed-- > resolve dependencies complete dependency resolution = Package Architecture version source size = installing: net-tools x86room64 2.0-0.25.20131004git.el7 base 306k transaction summary = installation 1 total package downloads: 306k installation size: 917kDownloading packages:net-tools-2.0-0 .25.20131004git.el7.x86 _ 64.rpm | 306 kB 00:00:00 Running transaction checkRunning transaction testTransaction test succeededRunning transaction is being installed: net-tools-2.0-0.25.20131004git.el7.x86_64 1and1 verification: net-tools-2.0-0.25.20131004git.el7.x86_64 1Accord 1 has been installed: net-tools.x86_64 0vv2.0-0.25.20131004git.el7 is over!

3. Rely on the failed command to try again after the program has been installed:

[root@localhost ~] # netstat-anptu | grep mysqltcp 0 0 0.0.0.0 anptu 3306 0.0.0.0 LISTEN 1716/mysqld

Tags: Commands transactions size software packages again plug-ins methods architectures profiles versions programs problems downloads attempts checks validation daily work work Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Microsoft vpn Docker MySQL