Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am following the steps of oracle installation in this site http://meandmyubuntulinux.blogspot.ca/2012/05/installing-oracle-11g-r2-express.html.

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

2 Answers 2

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
1  
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
1  
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

 
discard

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.