Ask Your Question
0

how store and exit from vi enviroment [closed]

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

baran gravatar image

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

hi my friends

please answer the question:

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

i enter:

[swift-hash]

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?

thanks

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
1

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

fifieldt gravatar image

Type:

:wq

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

edit flag offensive delete link more
2

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

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

Comments

Nothing happens after changes in the environment, and press esc

baran gravatar imagebaran ( 2013-08-05 22:06:56 -0500 )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: https://help.ubuntu.com/community/VimHowto

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 177 times

Last updated: Aug 05 '13