bash:vi:command not found

I downloaded and installed "Cygwin yesterday onto my PC running Windows XP. When I tried to type "vi" in Cygwin's window, I got the following message bash: vi: Command not found

What shud i do inorder to get into vi editor

Thanks

Try

/usr/bin/vi

Looks like your path isn't setup in your profile

Well, it displayed the following message
bash: /usr/bin/vi: No such file or directory

On my cygwin install, I have a soft link in /usr/bin for vi which links to vim.

 
/usr/bin/vi -> vim.exe

ok,

Looks like it didn't install then with the setup, perhaps try re-running the setup this time choosing vi under setup, I haven't used Cygwin for some time myself.

1 Like

Before you re-install, just see if you have vim and, if so, add the softlink.

Try find / -name 'vi' -not -path "/cygdrive*" 2>/dev/null (guessing on the '-not' bit to avoid searching in your windows drives -- if this doesn't work, just do find / -name 'vi' 2>/dev/null and wait a lot longer for it to complete) to search through your root filesystem for a file named 'vi'.

I could see nothing on my screen. Perhaps it didn't execute the command properly. This is what i have got after executing the abov following command
/cygdrive/r/abc/accounts/bin $ find / -name 'vi' 2>/dev/null
/cygdrive/r/abc/accounts/bin $

Try this:

 
cd /usr/bin
ls vi*

If you see vim.exe (every cygwin install I've seen has vim), then do

 
ln -s vim.exe vi

Try it with 'vim' now, to see if you have vim installed.

Alternatively, you can run the setup.exe file from cygwin again and you can install more packages from there (without reinstalling cygwin itself).

Okay..I will go ahead and do that. Thanks a lot for letting me know.

---------- Post updated at 03:07 PM ---------- Previous update was at 03:05 PM ----------

I tried in executing the command which you gave me.It yielded me the following result:

/home/x457489 $ cd /usr/bin
/usr/bin $ ls vi*

ls: cannot access vi*: No such file or directory