Most Useful GNU Nano Keyboard Shortcuts That You Need To Know

Everyone who uses Linux instead of Windows comes in contact with GNU Nano. But even those who use only Windows OS should not worry either. Nano is simply a command line text editor in Unix and Linux operating systems. Beside being command text editor it also provides additional functionality. Nano is licensed under GNU, General Public License is n’t it cool?
However, you cannot compare Nano with other text editors like Sublime and VsCode etc. Even though it’s more efficient than others, many people can’t use it properly as its keyboard shortcuts are very much different from them. If one comes to know them, he’d prefer it over other text editors.
We are going to discuss those major Nano keyboard shortcuts that are easy to remember and you can use them to take full advantage of Nano. These shortcuts are distributed into different groups for your ease.
Keyboard Shortcuts For Movement in Nano
One of the challenging tasks in Nano is moving about while performing a task. For example you have to go to the end of a line, you’d need to press the Right Arrow hundreds of times and imagine you have to do more than 10 different command lines. So if you use Nano you need to know this beforehand to save yourself from getting exhausted. We have mentioned some of the best ones below:
- Ctrl+ A = To go to the beginning of the command line
- Ctrl+ E = To go to the end of the line
- Ctrl+ Y = To move one page up
- Ctrl+ V = To move to the end of the whole file
- Ctrl+F = To move forward one character
- Ctrl+B = To go backward one character
General Editing Keyboard Shortcuts in Nano
Another important thing is undoing an error or performing other smart edits. In Nano, if you make an error it becomes itself a task to undo it while most users simply close and reopen the file again to start over that’s obviously annoying. How would you feel if you need to close the file to get it undone and lose other data as well? Check out the keyboard shortcuts below which will make small edits ease:
- Ctrl+K = Cut current line into the cutbuffer, to cut up to two line or more keep pressing this shortcut until two lines are removed.
- Ctrl+U = Paste contents from cutbuffer
- Alt+U = To undo
- Alt+E = To redo last undone action
- Ctrl+T = To invoke spell checker
- Ctrl+W = To open the search bar + search term and then press Enter
- Ctrl+O = To save your edited file
- Ctrl+X = To exit
Deletion Keyboard Shortcuts in Nano
The last group of Nano shortcuts on our list is for deleting something. For deleting unwanted text knowing the shortcuts will save you tons of time and if you don’t know the shortcuts it takes the same tons of time to remove it. So one needs to remember these shortcuts for good. Check out few useful ones below:
- Alt+Bsp = To delete the word to the left
- Ctrl+Del = To delete the word to the right
- Alt+Del = To delete the current line
Conclusion
It’s a fact that even hundreds of Linux users prefer Vim or eMacs rather than Nano. But if you use Nano you should know these keyboard shortcuts to make it work better for you.