How Do I Save and Exit in Linux Terminal?
Contents Command Purpose: Wq or Zz Save and Quit/Exit Vi. :Q! Quit Vi and Do Not Save Changes. Yy Yank (Copy a Line of Text). How Do I Save and Exit in Linux?...
Contents
| Command | Purpose |
|---|---|
| :wq or ZZ | Save and quit/exit vi. |
| :q! | Quit vi and do not save changes. |
| yy | Yank (copy a line of text). |
How do I save and exit 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.
Must Read
How do you save and exit 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.