more Command in Linux Made Simple

The more command in Linux is the fastest way to read large files in your terminal without getting buried in output. When you open a 4,000-line configuration file using cat and it display all that data onto your screen in an instant, you know exactly what I’m talking about. This is precisely what more was made for. The first time I used more to view a systemd journal on a live server, I finally understood how many hours I had wasted scrolling through terminal output I could not even read properly.

Whether you are new to Linux and still learning your way around the terminal, or you have become comfortable enough to start working seriously with shell commands, more is one of those commands you will reach for almost every day. Not only is it easy and fast to use, but it is also available almost everywhere, including minimal containers and older RHEL systems where less may not be installed.

Note:

If you already know more and want to go further, check out our guide on less command in Linux which adds backward scrolling and more search flexibility.

Examples


#01

What Is the more Command?

The more command in Linux gives you a reading window for your terminal instead of flooding the screen. Think of more as a terminal viewing area rather than just another way to view your files. Instead of showing you the entire file at once, more displays one screen of content at a time and waits for you to tell it to continue by pressing the Space key.

You can advance through a file one full screen (or page) at a time by pressing Space, move forward one line at a time by pressing Enter, or quit by pressing q.

more is technically a pager utility. A pager reads a file (which can also be the result of piped input) and breaks the content into chunks that fit within your terminal's vertical size. The pager has existed since the early days of Unix in the 1970s. As such, nearly every Linux distribution includes it by default, from a base installation of Ubuntu 24.04 Server to an outdated CentOS 6 system sitting in a forgotten data center.

Since no setup is required to use more, you can simply run it from your terminal and start viewing files immediately. Advanced users who want to override some of more's default behavior should refer to the MORE environment variable.


#02

Syntax of the more Command

bash
LinuxTeck.com
more -d /etc/hosts

The full syntax reference is: more [options] [+line_number] [+/pattern] filename. Breaking each part down in plain English:

[options] are flags like -d or -s that change how the output behaves. They are all optional.

[+line_number] tells more to start at a specific line. So more +50 app.log skips straight to line 50 instead of starting at the top.

[+/pattern] jumps to the first occurrence of a search string. Useful when you know what you are looking for and do not want to scroll manually.

filename is the file you want to read. You can pass multiple filenames and more will page through them in order.

Note:

If you run more without a filename, it reads from standard input. This is what makes it work inside pipes: ps aux | more or dmesg | more.


#03

Common Options and Navigation Keys

Here are the flags you will actually use, plus what they do in practice.

Flag / Key What It Does When to Use It
-d Shows "[Press space to continue, q to quit]" prompt When sharing a terminal with someone unfamiliar with pagers
-s Squeezes multiple blank lines into one Reading files with excessive whitespace (some logs, man pages)
-p Clears screen before each new page Reading docs cleanly without previous output bleeding through
-c Overlays new content on top of old (no clear) Faster rendering on slow connections or older terminals
-f Counts logical lines instead of screen lines for pagination. Long lines still wrap visually, but are treated as one line for page counting. Wrapped text can scroll off the top unexpectedly. Files with very long lines where you do not want pagination to split mid-line
-u Suppresses underline formatting Cleaner output when reading man pages piped through more
+/pattern Starts at first match of a search string Jumping straight to an error keyword in a long log
+N Starts at line number N When you already know which line has the relevant content
Space Move forward one full page General navigation while reading
Enter Move forward one line Reading slowly, line by line
/pattern Search forward for a string while inside more Finding keywords without exiting
= Show current line number Orientation in a large file
q Quit and return to the shell When you are done or got what you needed

#04

more Command in Linux: Practical Examples

I. View a Text File One Page at a Time

The most basic use. You have a file and you want to read it without the terminal flooding you. Run more and press Space to page through it.

bash
LinuxTeck.com
more /etc/ssh/sshd_config
Sample Output
# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $

# This is the sshd server system-wide configuration file.
# See sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin

Port 22
#AddressFamily any
#ListenAddress 0.0.0.0

--More--(28%)

Tip:

The percentage at the bottom shows how far through the file you are. Press q any time to exit without reading the rest. Note: percentages only display when reading a file directly. If you pipe data into more (for example, ps aux | more), the system cannot calculate the total size and will only show --More-- with no percentage.

II. Page Through a Long Directory Listing

You run ls -la on a directory with hundreds of files and everything scrolls off the screen. Pipe it into more instead.

bash
LinuxTeck.com
ls -la /usr/bin | more
Sample Output
total 134256
drwxr-xr-x 2 root root 69632 Jun 1 09:14 .
drwxr-xr-x 14 root root 4096 May 15 08:00 ..
-rwxr-xr-x 1 root root 59736 Aug 5 2023 [
-rwxr-xr-x 1 root root 35344 Mar 14 12:00 aa-enabled
-rwxr-xr-x 1 root root 35344 Mar 14 12:00 aa-exec
-rwxr-xr-x 1 root root 22912 Mar 2 2023 addpart
-rwxr-xr-x 1 root root 76496 Feb 8 14:30 apt
-rwxr-xr-x 1 root root 32176 Feb 8 14:30 apt-cache
--More--

III. Display Content with Navigation Help (-d)

If you are working on a shared system or scripting a guide for someone else, -d adds a help prompt so users know what to press without having to guess.

bash
LinuxTeck.com
more -d /var/log/syslog
Sample Output
Jun 3 10:01:01 ubuntu CRON[12045]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jun 3 10:05:01 ubuntu CRON[12098]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jun 3 10:09:31 ubuntu systemd[1]: Starting Daily apt download activities...

[Press space to continue, 'q' to quit.]

IV. Jump to a Specific Line Number

You already know the relevant content is around line 200 in an access log. Skip the top and start there directly with the +N syntax.

bash
LinuxTeck.com
more +200 /var/log/nginx/access.log
Sample Output
192.168.1.45 - - [03/Jun/2026:08:14:22 +0000] "GET /api/health HTTP/1.1" 200 42 "-" "curl/7.88.1"
192.168.1.45 - - [03/Jun/2026:08:14:25 +0000] "POST /api/data HTTP/1.1" 201 118 "-" "python-requests/2.28.2"
10.0.0.12 - - [03/Jun/2026:08:14:30 +0000] "GET /dashboard HTTP/1.1" 304 0 "-" "Mozilla/5.0"

--More--(18%)

V. Search for a Pattern Before Opening

You want to jump straight to the first occurrence of "ERROR" in a log file without manually scrolling. Use +/ to do that on launch.

bash
LinuxTeck.com
more +/ERROR /var/log/app/application.log
Sample Output
2026-06-03 08:45:10 INFO Initializing subsystem
2026-06-03 08:45:12 INFO Starting request handler
2026-06-03 08:45:13 ERROR Failed to connect to database: connection timeout
2026-06-03 08:45:14 ERROR Retry attempt 1 of 3
2026-06-03 08:45:16 ERROR Retry attempt 2 of 3

--More--(34%)

Tip:

Once inside more, you can keep searching forward by typing /ERROR again and pressing Enter to jump to the next match.

VI. Squeeze Extra Blank Lines in a Verbose File (-s)

Some config files and logs have stretches of empty lines that waste screen space. The -s flag collapses them into one blank line so you can read faster.

bash
LinuxTeck.com
more -s /etc/httpd/conf/httpd.conf
Sample Output
ServerRoot "/etc/httpd"

Listen 80

Include conf.modules.d/*.conf

User apache
Group apache

ServerAdmin root@localhost

--More--(12%)

VII. Pipe Command Output Into more

Any command that produces a long output can be piped into more. This is where you will use it most in practice, especially for process lists, package queries, and environment dumps.

bash
LinuxTeck.com
ps aux | more
Sample Output
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 168588 13024 ? Ss 08:00 0:03 /sbin/init
root 2 0.0 0.0 0 0 ? S 08:00 0:00 [kthreadd]
root 478 0.0 0.4 109504 38912 ? Ss 08:00 0:01 /lib/systemd/systemd-journald
root 510 0.0 0.1 24016 9216 ? Ss 08:00 0:00 /lib/systemd/systemd-udevd
www-data 1204 0.0 0.3 199340 28160 ? S 08:01 0:00 apache2
www-data 1205 0.0 0.3 199340 27904 ? S 08:01 0:00 apache2

--More--

VIII. Read Multiple Files in Sequence

You can pass multiple filenames to more and it pages through them one after the other. Useful when reviewing several config files in the same session.

bash
LinuxTeck.com
more /etc/hosts /etc/resolv.conf /etc/nsswitch.conf
Sample Output
::::::::::::::
/etc/hosts
::::::::::::::
127.0.0.1 localhost
127.0.1.1 ubuntu-server
::1 localhost ip6-localhost ip6-loopback

--More-- (Next file: /etc/resolv.conf)

Tip:

more displays the filename header between files automatically. You will see it printed like :::::::::::::: /etc/resolv.conf :::::::::::::: before each new file begins.

IX. Real-World: Review a Deployment Log on a Minimal Container

On a minimal Docker container or a stripped-down Rocky Linux 9 image, less is often not installed. more is. When a deployment fails and you need to read the build log fast, this is your command.

bash
LinuxTeck.com
more +/FAILED /tmp/deploy_20260603.log
Sample Output
...skipping
[2026-06-03 09:12:44] INFO Pulling image from registry...
[2026-06-03 09:12:51] INFO Image pulled successfully
[2026-06-03 09:12:52] FAILED to apply migration: relation "sessions" already exists
[2026-06-03 09:12:52] ROLLBACK initiated

--More--(71%)

X. Real-World: Page Through dnf / apt Package History

Package history files get long fast. On Rocky Linux 9 or RHEL, piping the dnf history output through more gives you a manageable read instead of a wall of transactions.

bash
LinuxTeck.com
dnf history | more
Sample Output
ID | Command line | Date and time | Action(s) | Altered
-------+---------------------------+------------------+-------------+--------
42 | upgrade | 2026-06-02 08:14 | Upgrade | 37
41 | install nginx | 2026-05-28 14:33 | Install | 5
40 | install mariadb-server | 2026-05-21 10:11 | Install | 12
39 | update | 2026-05-14 09:00 | Upgrade | 22

--More--

XI. The Classic Mistake: Piping more Into more

New users sometimes do this when trying to combine commands. Piping more into another more does nothing useful. The second pager just ends up reading the output of the first one, which has already handled pagination.

Warning:

This is wrong and does nothing useful:

cat file.txt | more | more

Just use one pager at the end of the pipe. The correct version is simply:

cat file.txt | more

Or even better, skip cat entirely: more file.txt

XII. View Environment Variables in a Readable Way

Running env or printenv on a system with many variables set dumps everything at once. Pipe to more and read through at your own pace.

bash
LinuxTeck.com
printenv | sort | more
Sample Output
BASH=/bin/bash
COLUMNS=220
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=ubuntu
DISPLAY=:0
HOME=/home/linuxteck
LANG=en_US.UTF-8
LOGNAME=linuxteck
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

--More--


#05

Why more Still Matters in 2026

Every sysadmin eventually reaches for less as their default pager. Fair enough, it is more capable. But more has a real edge in two specific situations: minimal environments where less is not installed, and scripted or automated contexts where you just need something predictable and portable. It ships on everything from a fresh Rocky Linux 9 minimal install to a Debian container image that weighs under 100MB. You will not always have a choice.

The bigger point is this: learning more properly teaches you the pager mindset. Once you internalize that any long output, whether from a file, a command, or a pipe, can be controlled and read at your pace, you stop letting the terminal overwhelm you. That habit carries forward into everything from reading vim buffers to working with Linux logging pipelines on production systems. The official documentation for more is maintained at man7.org if you want the full reference.


Key Takeaways

  • Run more filename to page through any text file. Press Space to advance a full page, Enter for one line, and q to quit immediately.
  • Use more +/keyword filename to jump straight to the first match instead of scrolling manually through hundreds of lines.
  • Use more +N filename when you already know the approximate line where the relevant content starts.
  • Pipe any long-running command into more using command | more. This works for ps aux, dnf history, printenv, and anything else that floods the screen.
  • On minimal containers or bare RHEL/Rocky Linux installs, more is almost always available even when less is not. Keep it in your toolkit.
  • The -s flag is underused. It makes verbose config files much faster to scan by collapsing runs of blank lines into one.
  • Never pipe more into itself. One pager at the end of the chain is all you need.

FAQ

I pressed Space and the file just ended. Did I miss something?

No, you hit the end of the file. more exits automatically when there is no more content. If the file felt short, it probably was. Run wc -l filename to confirm the line count before reading it with more next time.

Can I scroll back up after pressing Space?

No. Modern Linux distributions running util-linux implement more as strictly forward-only. Pressing b will not scroll back, even when reading a file directly. If you need to go back, switch to less, which supports full backward navigation on both files and piped input.

What is the difference between more and cat when reading a short file?

For short files that fit on one screen, they behave almost identically. cat prints the entire file and returns you to the shell immediately. more shows the same content but waits for you to press q to exit. For anything longer than your terminal height, more is the right call. For quick one-liners and tiny files, cat is fine. Check out our cat command guide for a full comparison.

Why does more quit on its own when I pipe output into it?

If the output fits on one screen, more just prints it and exits because there is nothing to page. It only stays open and waits for input when the content is longer than your terminal height. This is expected behavior, not a bug.

Does more work the same on Ubuntu and Rocky Linux?

Yes, with one small difference. On Ubuntu, more comes from the util-linux package. On Rocky Linux 9 and RHEL, it is also from util-linux. The flags and behavior are consistent across both. The version number might differ slightly but you will not notice in daily use.

I used +/pattern but it just opened the file from the top. What went wrong?

The pattern did not match anything in the file. more falls back to the top of the file when no match is found rather than throwing an error. Double-check your search string, remember it is case-sensitive by default, and try a shorter keyword. If the string has spaces, wrap it in quotes: more +/"connection refused" app.log.


LinuxTeck - A Complete Linux Learning Blog
From your first terminal command to advanced sysadmin skills, every guide here is written in plain English with real examples you can run right now.

About Aneeshya S

Aneeshya S is a Senior Linux Trainer and System Administrator with over 10 years of experience. She actively follows emerging technologies and industry trends. Outside the terminal, she enjoys music and travel.

View all posts by Aneeshya S →

Leave a Reply

Your email address will not be published.

L