Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am following the steps of oracle installation in this site

I don't know how to save the file.

Typing a command like command sudo vim /sbin/chkconfig is opening a nano text editor. So how to save that file?

share|improve this question
up vote 2 down vote accepted

You are opening the file with vim, not with nano. After editing the file press escape to exit the Insert-Mode. Then try :wq to write an exit the editor.

share|improve this answer
thanks it works for me. – Praneeth Pj Mar 12 '13 at 15:42
what's the difference between the two commands we each offered? Just out of curiosity – D4nC00per Mar 12 '13 at 15:43
There is no difference between :wq and :x. The result is the same. I'm just used to use :wq. – prophecy201 Mar 12 '13 at 15:46
Fair enough, likewise I'm used to using :x Thank you for the reply :) – D4nC00per Mar 12 '13 at 15:49

By typing vim you have opened it in Vim not nano as your question states, nano is slightly more user friendly than vi editors, I've found.

However, you can save files in vim using :x, if you're in "Insert" mode you will have to press Esc first.

share|improve this answer
thanks it works for me.but what mean the encrypt key? – Praneeth Pj Mar 12 '13 at 15:43
That's if you use :X not :x. The difference is the case. If you use capital X it will encrypt the file, with the password you enter. In this case I presume you want small x which will save and close the editor. – D4nC00per Mar 12 '13 at 15:45
ok thanks for all. – Praneeth Pj Mar 12 '13 at 15:48
You should mark one as an answer, even though they're the same. – D4nC00per Mar 12 '13 at 15:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.