Homelab hours are real hours.

title: Stop Catting the Manual
date: 2026-02-21 · 3 min read
type: field-note · tags: #linux #learning #shell

Stop Catting the Manual

I kept running cat on the same file to re-read instructions. There is a better way to work.

I was following a migration guide I had written for myself — a Markdown file with numbered steps. My workflow looked like this:

  1. cat guide.md to read the next step
  2. Scroll up to find where I was
  3. Run the command
  4. cat guide.md again because I forgot step 4
  5. Repeat

This is the Linux equivalent of pointing at a menu and smiling. It works. You get food. But you are not speaking the language.

The problem is not the tool — it is the habit

I was treating the terminal as stateless. Run a command, get output, lose context, run the command again. Every time I needed to reference something, I started over. That is not how people who are fluent in the terminal work.

Reading specific lines

If you just need lines 4 through 7 of a file:

sed -n '4,7p' guide.md

That is precise, but it still assumes you know the line numbers. You are still cat-ing with extra steps.

The real answer: stop closing the file

less exists for exactly this reason. It opens the file and lets you navigate inside it:

less guide.md
  • /pattern to search forward
  • n for next match
  • g to go to the top, G to go to the bottom
  • q to quit when done

The file stays open. You scroll through it. You search it. You do not re-read it from the top every time. This is what a pager is for.

If the guide has Markdown headers for each step, searching for ## Step jumps you through the document one section at a time.

Keeping the guide visible while you work

This is where it gets interesting — and where old habits really show.

Option 1: tmux split panes. Open the guide in one pane, work in the other.

tmux split-window -h 'less guide.md'

Now the guide is always visible. No switching, no scrolling back, no re-reading. Ctrl-b then arrow keys to move between panes.

Option 2: vim split. If you are already in vim, open the reference alongside your work:

:vsplit guide.md

Two files, side by side, one editor. Ctrl-w then arrow keys to move between them.

Option 3: the macOS hybrid. Open the Markdown file in Cursor or another GUI editor on your Mac, and keep the terminal in a separate window or tmux session. Copy from the GUI, paste into the terminal. This works fine for local machines — your clipboard bridges both worlds naturally.

But here is where it breaks: if you are using SSH into a remote machine inside tmux, your macOS clipboard and the remote terminal are not connected by default. You are copying from Cursor on your Mac but pasting into a tmux session that has its own clipboard. The text never arrives.

This is solvable — tmux can bridge to the system clipboard, and terminal emulators can handle it with OSC 52 escape sequences — but the simpler answer is: if you are working remotely, keep the reference file on the remote machine too. Open it in a tmux pane or a vim split. Stay in one world.

Where to practice

When I started testing these commands, I almost did it in my home directory. Old habit — just start typing wherever you are.

The Linux way: use /tmp. It is a temporary filesystem that gets cleaned on reboot. Need a scratch space to try things?

mkdir /tmp/scratch && cd /tmp/scratch

Create files, experiment, break things. It clears itself out. You do not have to remember to clean up, and you are not cluttering your home directory with test files you will forget about.

This is another small example of the same pattern: there is a place for everything in Linux, and using the right place is part of speaking the language.

The language analogy

When you visit a country and do not speak the language, you get by. You point at things, you use a translation app, you smile and nod. It works for a tourist.

But if you live there, you learn the language. Not because pointing stops working, but because speaking it lets you think in it. You stop translating from your native language and start forming thoughts directly.

The terminal is the same way. cat and scroll-up and copy-paste from a GUI are pointing and smiling. less, tmux, and vim splits are speaking the language. The commands do the same thing. But one approach keeps you a tourist, and the other lets you live there.

I am tired of being a tourist.