Exiting the vi editing mode during Linux study.

When you are in vi editing mode, press the Esc key to ensure you are in command mode. Then a colon(:) will appear in the bottom left corner of the command line, indicating you are in ex mode.

To exit the vi editor and save changes, enter`:wq` and press enter. This will save the modifications and exit the vi editor.

If you want to quit the vi editor without saving changes, you can type `:q!` and press Enter. This will force exit the vi editor without saving any modifications.

Before entering the colon, you can use the hjkl keys (left, down, up, right) to move the cursor to the desired location for modification. You can also use other commands such as delete, copy, etc., for editing. Once editing is complete, press the Esc key to return to command mode, then enter the exit command.

bannerAds