Linux prompts [root@localhost ~]# iptraf when executing commands?

  

We all know that many operations of Linux system require commands to execute. In the process of executing commands, sometimes I encounter [root@localhost ~]# iptraf error prompt. How to solve this problem? The following small series will introduce you to the Linux implementation command prompt [root@localhost ~]# iptraf solution.

Tip:

[root @ localhost ~] # iptraf

-bash: iptraf: command not found

To solve this problem Need to install the corresponding package, many times the command name is not necessarily the name of the package,

The iptraf command here is just the name of the package, so it is better to solve, directly install the package ok It is. As follows:

yum install iptraf

But what if the command name and package name are not the same?

As the iostat command, the command name is not the same as the package name. If it is installed directly, it will fail:

1234567 [root@localhost ~]# yum install iostat

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* rpmforge: mirrors.neusoft.edu.cn

Setting up Install Process

No package Iostat available.

Error: Nothing to do

At this point we need to use the following method:

[root@localhost ~]# yum -q install /usr /bin/iostat

================================================= ==============

======================================= ========================================================================================== Version Repository Size

================================================== =============

======================================== ================================================================== Br>

sysstat x86_64 9.0.4-20.el6 163 225 k

Transaction Summary

=========================== =============================================================== =================================================================== ======

Install 1 Package(s)

Is this ok [y/N]:

where /usr/bin/iostat does not exist Then, why can you find the package you belong to?

In fact, it is to use the rpm database to find. As for why the path /usr/bin is used, it is because this command is a user's command, /usr. This is also a guess. If you can't find the package with this path, just change one.

If you use /bin, you can't find it:

[root@localhost bin]# yum install /bin/iostat

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* rpmforge: mirrors.neusoft.edu.cn

Setting up Install Process

No package /bin/iostat available.< Br>

Error: Nothing to do

The main problem is to look at the path of the command. If it is correct, you should be able to find it.

The above is the Linux execution command prompt [root@localhost ~]# iptraf method is introduced, the main reason for this prompt is caused by the difference between the command name and the software name, you need to find out whether the rpm package to which the command belongs is correct. .

Copyright © Windows knowledge All Rights Reserved