Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Rep:
shankar, if you are new to Linux, are you also new to vi? If so, you may want to try a more "newbie-friendly" text editor, such as the Gnome-based GEdit for starters.
If you are set on using vi, try these and see if anything returns with a positive response:
Code:
which vi
ls -l /usr/bin/vi
ls -l /bin/vi
If any of these return a path to 'vi', you need to add that path to your $PATH variable in order to use it.
You could simply use your package manager and see if vim is installed. If not, install it.
The vi command will probably be installed as a symbolic link /bin/vi -> /bin/vim.
It would be helpful if you would put your distro in your user profile. Then you could get advice like "sudo zypper install vim" or "sudo yum install vim", for a quicker answer. But often the best advice depends on what distro you are using.
If you are working from a rescue image, there may be a vim-minimal available rather than vim, so save space.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.