We all know that a lot of Linux system operations require commands to execute, in the process of executing commands, sometimes encountered [root@localhost ~]# Iptraf error prompts, how to solve this problem? The following small series to introduce Linux execute command prompt [ Root@localhost ~]# Iptraf solution.
Tips:
[Root@localhost ~]# Iptraf
-bash:iptraf:command not found
To solve this problem, you need to install the appropriate package, many times the command name is not necessarily the name of the package,
The Iptraf command here is exactly the name of the package, so it's better to fix it, and it's OK to install the package directly. As follows:
Yum Install Iptraf
But what if the command name is not the same as the package name?
such as the Iostat command, whose command name is not the same as the package name, will fail if installed directly:
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 Todo
Then we need to use the following method:
[Root@localhost ~]# yum-q Install/usr/bin/iostat
======================================================
======================================================
============
Package Arch Version Repository Size
======================================================
======================================================
============
Installing:
Sysstat x86_64 9.0.4-20.el6 163 k
Transaction Summary
======================================================
======================================================
============
Install 1 Package (s)
Is this OK [y/n]:
The/usr/bin/iostat here does not exist, then why can you find the package that belongs to?
In fact, the use of the RPM database to find. As for why to use/usr/bin this path, is because this command belongs to the user's command, namely/usr. This is also a guess, if you use this path can not find the package, change one.
If you use/bin, you won'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.
Error:nothing Todo
The main problem is to look at the path of the command, if it is right, should be able to find.
Above is the Linux execute command prompt [root@localhost ~]# Iptraf Method Introduction, the main reason for this is because the command name and the software name are different, you need to find out whether the RPM package that the command belongs to is correct.