How Do I Save a Bash File in Linux?
Contents to Save and Quit Press Shift + Z + Z, :Wq, or in Command Mode. If You Are Opening the File in Read Only Mode You Will Have to Hit: Q! . If You Are New...
Contents
To Save and quit press Shift + Z + Z , :wq , or in command mode. If you are opening the file in read only mode you will have to hit :q! . If you are new to Linux I would suggest using something other than vi .
How do I save a .sh file in Linux?
Follow these steps:
- Run nano hello.sh.
- nano should open up and present an empty file for you to work in. …
- Then press Ctrl-X on your keyboard to Exit nano.
- nano will ask you if you want to save the modified file. …
- nano will then confirm if you want to save to the file named hello.sh .
Must Read
How do I save a bash file in Terminal?
To save the file and exit the editor simultaneously, press Esc to switch to normal mode, type :wq and hit Enter .
- Press Esc.
- Type :wq.
- Press Enter.
2 окт. 2020 г.