How to save and exit redis.conf?

2019-09-02 16:59发布

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?

2条回答
再贱就再见
2楼-- · 2019-09-02 17:17

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

nano

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

nano

查看更多
干净又极端
3楼-- · 2019-09-02 17:37

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!
查看更多
登录 后发表回答