how store and exit from vi enviroment [closed]

asked 2013-08-04 11:07:06 -0600

baran gravatar image

updated 2013-08-04 11:09:43 -0600

hi my friends

please answer the question:

in command : vi /etc/swift/swift.conf,

i enter:


random unique string that can never change (DO NOT LOSE)

swift_hash_path_suffix = fLIbertYgibbitZ.

now i want store and exit from vi enviroment. how can i perform?


edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by smaffulli
close date 2013-08-05 10:27:15.106334

2 answers

Sort by ยป oldest newest most voted

answered 2013-08-04 19:03:35 -0600

fifieldt gravatar image



(: goes to the prompt, w for write and q for quit)

edit flag offensive delete link more

answered 2013-08-05 00:09:09 -0600

Jobin gravatar image

Just expanding on fifieldt's answer, press "esc" (the escape key) and then :x or :wq to save and exit vi or :q! to just exit without saving the changes.

edit flag offensive delete link more


Nothing happens after changes in the environment, and press esc

baran gravatar imagebaran ( 2013-08-05 22:06:56 -0600 )edit

After pressing "esc", you may notice that you can no more change your file by adding/removing characters to your file, this is the command mode in vi. Please refer to this document to have a quick look into vi:

Jobin gravatar imageJobin ( 2013-08-06 08:10:04 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-08-04 11:07:06 -0600

Seen: 274 times

Last updated: Aug 05 '13