How do I scroll up and down one line in terminal?

Cmd arrow up / down, scrolls one page up / down, but how do I scroll 1 line?

Posted on Mar 19, 2021 1:10 PM

Reply
11 replies

Mar 21, 2021 7:51 AM in response to SmithIT2000

SmithIT2000 wrote:

Cmd arrow up / down, scrolls one page up / down, but how do I scroll 1 line?


Is this in an editor?


Use the up arrow if you are wanting previous command line.


Use the mouse/Trackpad if you are scrolling text output.


Command up-arrow for scrolling up through the prompts


If this is buffer question—

https://stackoverflow.com/questions/27616474/how-can-i-scroll-up-more-increase-the-scroll-buffer-in-iterm2

Mar 23, 2021 1:59 PM in response to HWTech

As I just said "This has nothing to do with what is running inside the terminal, the ability to scroll is implemented by terminal itself."


I want to scroll the actual window. Nothing to do with the shell.


Go to terminal, cat a large file, then hold down the "fn" button while tapping the "arrow up" button, every time you tap "arrow up" it will show you the next page of what the output was. Just try it.

Mar 21, 2021 7:54 AM in response to SmithIT2000

At the Terminal prompt, it does not re-read previous scrolled data when you move the cursor around. Terminal prompt accepts your NEW typed input, ONLY. That is why this environment is referred to as "Command-line input".


As leroydouglas suggests, you can press up-arrow to have the computer automatically re-type the previous ONE line, [and again as many times as you like] but that is NOT somehow "moving" there. It is re-typing the previously-typed line.

Mar 21, 2021 1:26 PM in response to SmithIT2000

SmithIT2000 wrote:

All answers so far are totally wrong -- would you pls test what you are saying before you type. thx.


I have never had an issue scrolling in Terminal using the trackpad—


Maybe you need to paint a bigger picture if "All answers so far are totally wrong."


Start with—

exact Mac?

exact macOS you are using ?

and what Shell you are using?


old issue, new issue, what changed?


Is this in an editor or the Command line interface...


Mar 23, 2021 9:35 AM in response to leroydouglas

I have a MacBook Pro (15-inch 2019). The OS is Catalina 10.15.7


The piece of software is called Terminal - it comes as standard.


This has nothing to do with what is running inside the terminal, the ability to scroll is implemented by terminal itself.


Holding fn + up or down arrow, scroll backward or forward through the terminal history. It scrolls by one whole page for whatever the size of the terminal window at the time.


Scrolling one whole page can be annoying, because something the few lines of history you are interested in goes over a page break.


What I want is something like fn + up / down -- but instead of scrolling a page, it scrolls one line.


Does it make sense what I want?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I scroll up and down one line in terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.