> ## Content Index
> Fetch the complete content index at: https://linuxhandbook.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Go to a Specific Line in Nano
- URL: https://linuxhandbook.com/nano-go-to-line/
- Published: 2023-10-11T06:41:57.000Z
- Updated: 2025-08-22T17:10:57.000Z
- Description: Don't jump to conclusions. Instead, learn to jump to the desired lines in Nano editor.
- Author: Abhishek Prakash
- Tags: Nano Essentials, #docs-col, #group-additional-tips

While you can move in the Nano editor using the arrow keys and page up/down keys, it's not very effective when you want to go to a specific line. This is specially the case when you are working on a huge text file. 

In this quick Nano tutorial, I'll share a few tips on how you can jump to a certain line number:

- Use `nano +n file` to open a file with cursor at line number n
- In the Nano editor, press `Ctrl+/` or `Ctrl+shift+_` keys and enter line number to move to the line

Let's see it in detail with examples.

## Open a file with cursor at specific line in Nano

This is simple. If you already know which line number you want to go to, open it with [Nano](https://www.nano-editor.org/?ref=linuxhandbook.com) in this manner:

```
nano +n filename
```

And it will open the file with cursor at the give line number n.

![Open nano editor at specified line](https://linuxhandbook.com/content/images/2023/10/open-nano-at-specified-line-number-final.svg)

But you will rarely know where to go when you are editing a file. The next method is more appropriate.

## Go to specific line from within Nano editor

So you have a text file already opened and you realized that you have to go to a particular line number.

All you have to do is to press the `Ctrl+/` or `Ctrl+Shift+_` keys and it will prompt you to enter a line number. Provide the line number and press the enter key. The cursor position jump to this new line number.

![Jump to line number in Nano](https://linuxhandbook.com/content/images/2023/10/jump-to-line-number.png)

Press Ctrl+Shift+\_ and then provide the line number

I am [displaying line numbers in Nano](https://linuxhandbook.com/nano-line-numbers/) so that it is easy to follow the example.

Here's the same in action:

![Go to a particular line in Nano](https://linuxhandbook.com/content/images/2023/10/go-to-specified-line-number-in-nano-final.svg)

Press Ctrl+Shift+\_ and then enter the line number

As you can see, it is easy to jump to lines in [Nano](https://www.nano-editor.org/?ref=linuxhandbook.com) if you know the correct keyboard shortcuts.

While they are displayed at the bottom and can be accessed in detail with the `Ctrl+G` keys, it is not always obvious and easy to understand.

And hence I wrote this quick tutorial to help you with it.