as the title. how to learn vi, bash, and i just cannot open vim. and ... what is ex in vi.

you probably don't have vim, as this is an extension of Vi (although essentially it is the same thing). try this to get vim (if you're using debian os):

sudo apt-get install vim

I have a great cheat sheet for vi, but it will take practice to learn how to use it effectively.

Here are some of my most used commands for vi/vim:

i - enter input mode
esc - escape input mode
del - delete text
:q - quit
:wq - write and quit
:q! - quit without saving
dd - deletes a whole line
shift+a - goes to the end of a line and enter input mode

As for the ex command, I'm not sure what that does without being able to test it.

Thank you...But after I have used vi for sometime, I still find it not as convenient as most graphical editors, isn't it? Especially there is no drag to us in vi.

Yes you're correct. A lot of old school programmers love vi, and that's all I use in work. It's because we use Subversion for version control, and it's good to keep everyone using the same editor for consistencies in the team.

If I was working alone, then I'd most likely use a graphical editor like gedit.