How Do I Save and Close a File in Linux?
Contents Once You Have Modified a File, Press [Esc] Shift to the Command Mode and Press: W and Hit [Enter] as Shown Below. to Save the File and Exit at the...
Once you have modified a file, press [Esc] shift to the command mode and press :w and hit [Enter] as shown below. To save the file and exit at the same time, you can use the ESC and key and hit [Enter] . Optionally, press [Esc] and type Shift + Z Z to save and exit the file.
How do I close and save a file in Linux terminal?
To save a file, you must first be in Command mode. Press Esc to enter Command mode, and then type :wq to write and quit the file. The other, quicker option is to use the keyboard shortcut ZZ to write and quit. To the non-vi initiated, write means save, and quit means exit vi.
Must Read
How do you close a file in Linux?
Press the [Esc] key and type Shift + Z Z to save and exit or type Shift+ Z Q to exit without saving the changes made to the file.