Method: 1. Use the "rpm -qa|grep vim" command to view vim-related information; 2. If the displayed results are incomplete, use the "yum -y install vim-enhanced" command to install them; 3. If there is no display As a result, you can install it with the "yum -y install vim*" command.
The operating environment of this article: centos 7 system, Dell G3 computer.
When the Linux system executes the vim command, it prompts
centos -bash : vim:command not found
At this time, you need to check whether the vim editor is installed:
1. Enter the rpm -qa|grep vim command.
If vim is installed correctly, the following prompt will be returned.
[root@ethink ethink_Env]# rpm -qa|grep vim vim-minimal-7.4.160-1.el7.x86_64 vim-filesystem-7.4.160-2.el7.x86_64 vim-common-7.4.160-2.el7.x86_64 vim-enhanced-7.4.160-2.el7.x86_64
2. If one of them is missing, such as vim-enhanced, use yum -y install vim-enhanced to install it
yum -y install vim-enhanced
3. If none of the above prompts are available, execute the yum -y install vim* command
yum -y install vim*
Recommended tutorial: "centos tutorial"
The above is the detailed content of What should I do if centos cannot find the vim command?. For more information, please follow other related articles on the PHP Chinese website!