Moving Around in Nano Editor

Once you know how to open and close files in Nano, let's talk about moving around in the editor.

It's simple and pretty much the same as a regular text editor:

  • Use up-down arrow keys to move up and down line by line
  • Use left and right arrow keys to move left and right character by character
  • Use page up and page down keys to move up and down by pages
📋
There are no modes in Nano. You just start using the keys to move around.

Using arrow keys to move around

The simplest way, really. Use the down arrow key to move down a line, the up arrow key to move up a line. Press and hold to keep on moving line by line.

0:00
/0:11

Moving up and down using up and down arrow keys

Similarly, you can use left and right arrow keys to move horizontally a line. Which is moving by characters.

0:00
/0:12

Moving left and right using arrow left and right arrow keys

Use page up-down keys

If you have a large text file, you can use the Page-Up and Page-Down keys to move by a page (visible lines on the screen).

Can it get any simpler than this? I don't think so.

Jumping lines

You can also use keyboard shortcuts to jump to the beginning or end of file and line.

  • Use home and end keys to jump to the beginning and end of a line
  • Use Ctrl+home and Ctrl+end keys to jump to the beginning and end of file
💡
You may also use mouse wheel to scroll up and down in Nano. If your terminal is configured to use mouse wheel, it should work.

Conclusion

See, unlike Vi and Vim, there are no different modes. No h j k l kind of keys here. You use the standard keys that are used in most editors like Notepad, Gedit and whatnot. That's why Nano is considered more suitable for beginners.