How to Exit Man Page in Terminal

How do I exit man page from the terminal? Once you have finished viewing a Linux manual page (man page) for a command or program, you will usually want to exit or quit the manual so you can return to your terminal and continue working. While this is a simple step, many new Linux users frequently ask: "How do I exit the man page?"

Because this question comes up so often, here is a clear and beginner friendly guide on how to exit man pages and info pages, along with useful tips for navigating, searching, and getting the most out of Linux documentation.

exit man page
how to exit man page

What Are Man Pages in Linux?

Linux man pages (short for manual pages) are built in documentation files included with most Linux commands and software packages. They explain what a program does, how it works, and which options or arguments it supports.

Man pages are typically concise reference guides. Another documentation format you may encounter is the info page, which often provides more detailed explanations in a structured, navigable format.

How to Access Man Pages

To open a manual page, type man followed by the command name, then press Enter:

man fdisk

This opens the documentation using a pager, usually less, which allows scrolling and searching.

Once inside a man page, you can move around using the keyboard:

  • Up / Down Arrow Keys – Move one line at a time.
  • Enter – Scroll down one line.
  • Spacebar – Move forward one full screen.
  • b – Move backward one full screen.

These controls work because most man pages are displayed using the less pager.

Getting Help Inside Man Pages

If you forget the navigation keys, press:

h

This opens a help screen listing all available navigation and search commands.

How to Exit Man Page

When you are finished reading a man page, simply press:

q

This quits the manual page and immediately returns you to your terminal prompt.

Searching Inside a Man Page

To quickly find a specific option or keyword:

  • Type /keyword and press Enter to search forward.
  • Press n to jump to the next match.
  • Press N to go to the previous match.

This is extremely useful for long man pages with many options.

Practical Example: Using Man Pages

  1. Open a terminal.
  2. Type man fdisk to display the manual for the fdisk disk utility.
  3. Scroll using the arrow keys or Spacebar.
  4. Search for options using /.
  5. When finished, press q to return to the terminal.

How to Use Man Pages

How to Use Info Pages

Info pages are another form of Linux documentation. Instead of man, use the info command:

info fdisk

For general commands, for example:

info cp

Navigation is similar, and you can exit info pages the same way as man pages by pressing q.

Frequently Asked Questions

How do I exit the man page in Linux?

Press the q key. This quits the manual page and returns you to the terminal prompt.

How do I scroll faster inside a man page?

Use the Spacebar to jump forward one screen at a time, and press b to move back one screen.

Is there a difference between man and info pages?

Yes. Man pages are concise reference manuals, while info pages often provide more detailed, structured documentation. Both can be exited by pressing q.

How do I search inside a man page?

Type /keyword and press Enter. Use n to move to the next result.

Can I view man pages for commands that are not installed?

Yes. You can view online man pages at sites like man7.org if they are not available locally.

Conclusion

Exiting a man page in Linux is relatively simple, just press q. While that key command may seem obvious to experienced users, it often trips up beginners who are new to working in the terminal. By learning not only how to quit, but also how to navigate, search, and use both man and info pages, you gain a powerful tool for understanding and mastering Linux commands. With this knowledge, you can quickly reference documentation, troubleshoot issues, and continue working seamlessly in the terminal.