Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to exit from vi

same thing you do with vim :-o
Comment

how to exit vi in linux

(without saving changes)
if in insert or append mode press Esc.
else type ":q!" and press Enter
Comment

bash vi exit

#to modify a file: 
vi FILENAME.sh
#press colon ':' + ENTER (the position of the cursor will be to the end of file)
#to exit & SAVE:
wq
#to exit WITHOUT SAVING:
q!
Comment

how to exit vi / vim

:q to quit (short for :quit)
:q! to quit without saving (short for :quit!)
:wq to write and quit
:wq! to write and quit even if file has only read permission (if file does not have write permission: force write)
:x to write and quit (similar to :wq, but only write if there are changes)
:exit to write and exit (same as :x)
:qa to quit all (short for :quitall)
:cq to quit without saving and make Vim return non-zero error (i.e. exit with error)
Comment

PREVIOUS NEXT
Code Example
Shell :: step3 pgadmin ubuntu 20.04 
Shell :: laravel installer version 
Shell :: linux create file 
Shell :: batch file with flags 
Shell :: migrate git repository 
Shell :: capacitor-google-auth 
Shell :: gufw ubuntu install 
Shell :: vscode regex src 
Shell :: install document viewer ubuntu 
Shell :: vs code remote branch not showing 
Shell :: github portfolio 
Shell :: duf command ubuntu 
Shell :: how to ignore .idea folder in gitignore 
Shell :: install stremio ubuntu 20.04 
Shell :: how to go to a previous commit state 
Shell :: sed replace first in file 
Shell :: linux gzip multiple files 
Shell :: running wordpress locally with valet 
Shell :: linux bash test connection to host and port 
Shell :: install docker in suse linux 
Shell :: uninstall anaconda in ubuntu 
Shell :: terminal rename folder 
Shell :: mqtt client ubuntu console 
Shell :: openssl install linux 
Shell :: how to install uvicorn 
Shell :: remap caps lock to shift linux 
Shell :: powershell start job 
Shell :: extracting tar.gz 
Shell :: remote host identification has changed 
Shell :: windows search multiple file types 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =