问题
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