How do you save and exit VIM in Ubuntu server
trying to set up a ubuntu (12.04) server
totally new to linux i'm trying to get samba running i edit my smb.conf file and exit using "ZZ" it takes me back to command prompt but the file doesn't change and the .smb.conf.swp remains. i get a message telling me this when i try to reopen smb.conf. what am i doing wrong? |
Code:
:w saves (write) |
thank you!
|
Vim editor is nothing but improved edition of Vi editor and all functions of Vi will also work in Vim.
In your case, you can close the file with following colon mode commands: :w - Save :wq - Save and quit :wq! - Save and quit forcefully. But as far as I could understand, in your case, it might be a problem of super-user privilages. I think you're opening the file directly as: vim <filename> Ubuntu don't by default gives you the root or super-user privilages, but you need to use sudo to access that. So just try to open the file with sudo command, as: sudo vim <filename> Enter your password: It will give you super user privilage to modify the file. Let me know if it helps you! |
:wq does the trick
i have been opening with sudo i didnt know what sudo meant but the howto's tell me too lol thanks! |
All times are GMT -5. The time now is 12:03 PM. |