How to save and exit redis.conf?

天大地大妈咪最大 提交于 2019-12-13 04:13:43

问题


I'm installing and Configuring Redis on Ubuntu 16.04 in digtalocean, following this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04 .

When it goes to 'Save and close the file when you are finished.' I have no idea what's the right command to close and save it. I tried to use :wq ,but it didn't work.

Any friend can give me some advice?


回答1:


The tutorial tells you to use to use nano. If you followed it your screen should look more or less like that:

Press Ctrl+x (^X) to "Exit", then press the obvious key to save your work:




回答2:


In case you opened the file with vim you can save and exit using this options in normal mode:

:wq
:x 
:ZZ (notice that it is in uppercase) 

:x and :ZZ Write current file, if modified, and quit

To force just add an ! at the end:

:x!
:wq!


来源:https://stackoverflow.com/questions/51335254/how-to-save-and-exit-redis-conf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!