If running sudo vim /etc/profile Appears during command execution sudo: vim: command not found If an error message appears, it indicates that the Vim editor is not installed on the current Linux system.
You can try installing the Vim editor using the following command:
For Debian/Ubuntu systems:
sudo apt-get update sudo apt-get install vimFor CentOS/RHEL systems:
sudo yum update sudo yum install vim
Run the process again after installation is complete. sudo vim /etc/profile Simply type the command to open or edit the file. /etc/profile The document is ready.