vi command not found. How to Install vi on CentOS 8
vi command not found. How to Install vi on CentOS 8 / RHEL 8 Server
Follow the below steps to Install vi command on CentOS 8 / RHEL 8 Server.
bash: vi: command not found
[root@server /]# vi /etc/resolv.conf
bash: /usr/bin/vi: No such file or directory
[root@server /]# vim /etc/resolv.conf
bash: vim: command not found
[root@server /]# vim /etc/resolv.conf
bash: /usr/bin/vim: No such file or directory
On Redhat and CentOS servers, vi command is provided by vim-minimal package and vim command is provided by vim-enhanced package.
1. Log into your CentOS 8 / RHEL 8 Server as ‘root’ user or as user with sudo privileges
2. Install vi and vim using yum or dnf command
Command to install vi :
OR
[root@server /]# dnf install vim-minimal
Command to install vim :
OR
[root@server /]# dnf install vim-enhanced
3. Enter ‘y’ and press enter, if yum ask for confirmation while installing.
4. Type the below command to verify it is installed correctly
The below command will show the version of vi installed.
VIM – Vi IMproved 8.0 (2016 Sep 12, compiled Nov 11 2019 19:07:48)
How to Download and install vi and vim rpm on CentOS 8 / RHEL 8 server
1. Log into your CentOS 8 / Redhat 8 server as ‘root’ user or user
2. Download vi-minimal and vi-enhanced rpm file from CentOS website using wget command
# wget http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/vim-enhanced-8.0.1763-13.el8.x86_64.rpm
3. Install the downloaded rpm file either using yum command or rpm command
(a) Command to install on CentOS / RHEL 8 x86_64 server using yum :
# yum install vim-enhanced-8.0.1763-13.el8.x86_64.rpm
Yum will install the package and the required dependencies.
(b) Command to install on CentOS / RHEL 8 x86_64 server using rpm :
# rpm -ivh vim-enhanced-8.0.1763-13.el8.x86_64.rpm
You must install the below dependencies if you are installing using rpm command.
libacl.so.1(ACL_1.0)(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.15)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.28)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libgpm.so.2()(64bit)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libselinux.so.1()(64bit)
libtinfo.so.6()(64bit)
vim-common = 2:8.0.1763-13.el8
which