Navigate man Pages
In this step, you will learn how to navigate through man pages, which are essential for understanding commands and their functionalities in Red Hat Enterprise Linux. The man command (short for manual) provides detailed documentation for most commands, utilities, and functions available on the system.
Note: In this LabEx environment (UBI9), we'll use commands that have available man pages. While a full RHEL system would include man pages for basic commands like ls and passwd, our streamlined environment focuses on available tools like curl, free, and groff.
To begin, let's view the man page for the curl command, which is used to transfer data from or to a server.
man curl
After executing the command, you will see the man page for curl. This page might be longer than your terminal screen, so you'll need to know how to navigate it.
Here are the common navigation keys you can use within a man page:
- Spacebar or PageDown: Scroll forward (down) one full screen.
- PageUp: Scroll backward (up) one full screen.
- DownArrow: Scroll forward (down) one line.
- UpArrow: Scroll backward (up) one line.
- D: Scroll forward (down) one half-screen.
- U: Scroll backward (up) one half-screen.
- Q: Exit the
man page and return to the command shell prompt.
Practice navigating the curl man page using these keys. Try scrolling down a few screens, then back up.
For example, press the Spacebar a few times to scroll down.
Then, press PageUp to scroll back up.
Finally, press Q to exit the man page.
## Press Spacebar multiple times to scroll down
## Press PageUp to scroll up
## Press Q to exit
You can also go directly to the beginning or end of a man page:
- G: Go to the start of the
man page.
- Shift+G: Go to the end of the
man page.
Let's try this with the free command's man page. The free command is used to display memory usage information.
man free
Once inside the free man page, press Shift+G to jump to the end of the page.
Then, press G to jump back to the beginning.
Finally, press Q to exit the man page.
## Press Shift+G to go to the end
## Press G to go to the start
## Press Q to exit