It seems that you are stuck in a vi editor session.
To close it proceed as follows:
To exit without saving changes made:
Press <Escape>.
(You must be in insert or append mode if not, just start typing on a blank line to enter that mode)
Press : <colon>.
The cursor should reappear at the lower left corner of the screen beside a colon prompt. The colon indicates that what follows is a Vim command.
Enter the following:
q!
Then press <Enter>.
This will quit the editor, and abandon all changes you have made; all changes to the document will be lost.
It seems that you are stuck in a vi editor session.
To close it proceed as follows:
To exit without saving changes made:
Press <Escape>.
(You must be in insert or append mode if not, just start typing on a blank line to enter that mode)
Press : <colon>.
The cursor should reappear at the lower left corner of the screen beside a colon prompt. The colon indicates that what follows is a Vim command.
Enter the following:
q!
Then press <Enter>.
This will quit the editor, and abandon all changes you have made; all changes to the document will be lost.
(source http:// itproguru. com/expert/ 2016/11/ how-to- exit-quit- vi-editor- without- saving- changes- step-by- step/ )