Labthrift Labthrift What to buy. What to skip. Why.

Written 30 Aug 2026. This is a how-to, not a product card.

Wrap long lines

After SSH works, fold wraps long lines so they don't run off the window. You don't need a file manager for this.

Number lines put numbers next to each line. Tonight you wrap long lines. fold does that. A long line becomes several short lines in the window. The file on disk stays one long line.

You are still only looking. It does not need a desktop, a file manager, or a new mini PC for this one job.

Skip until SSH already works

SSH from the couch should already get you a prompt. If line numbers are what you want, that is number lines. If a whole dump with no wrap is what you want, that is read a file without opening the editor. If one screen at a time is what you want, that is read a file one screen at a time. Skip this whole note if you only need a house share other computers browse. That is a folder the house can open.

What this is

fold wraps long lines. You type fold, then a file. Default width is 80 columns. -w is optional narrower wrap. -s is optional break at spaces so words stay whole. The computer prints wrapped lines. It does not rewrite the file unless you ask it to.

It is not cat. Cat dumps without wrap. It is not less. Less is one screen at a time. It is not fmt. Fmt reflows paragraphs. That is reflow paragraphs.

Wrap long lines from a practice file

SSH in.

Make a long line in home:

printf 'The old PC in the closet still turns on and you can type commands from the couch.\n' > ~/note.txt

That save is save output to a file. Peek first:

cat ~/note.txt

You want the line to run long across the window. Now wrap long lines:

fold ~/note.txt

You want several short lines in the window. Default width is 80 columns. The file on disk is still one long line. That is the whole first-night trick: wrap in a window, file left alone.

Need a narrower wrap?

fold -w 40 ~/note.txt

-w 40 is width 40 columns. The long line becomes more short lines.

Need break at spaces so words stay whole?

fold -s -w 40 ~/note.txt

-s breaks near spaces when it can. Plain fold is enough for tonight.

If you see command not found for fold, install the usual tools, then try again:

sudo apt install coreutils

Debian and Ubuntu Server usually already have them. That install is not a reason to buy a file manager.

When you are done looking, throw away the practice file:

rm ~/note.txt

Careful delete only. That is delete a file carefully.

Useful extras, still looking only

Skip fmt, sed, awk, and xargs tonight. Tonight the tool is fold. Skip rewriting the file with a redirect tonight. Practice print first.

Skip fold over files you care about, paths under /etc, and SSH settings. Practice only files you just made in home. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.

What this is not

This is not line numbers. That is number lines. It is not a whole dump without wrap. That is read a file without opening the editor. It is not one screen at a time. That is read a file one screen at a time.

What next

Need line numbers first? Number lines. Need columns joined? Join columns side by side.

Skip

Sources

GNU coreutils: fold invocation. Debian: fold. Ubuntu: fold. Official pages only. For the login, see SSH from the couch. For line numbers, see number lines. For a whole dump, see read a file without opening the editor. For one screen, see read a file one screen at a time.

Also on this topic

SSH from the couchType commands on the computer from your laptop, on the house network. Password login first. Don't open this to the internet. Number linesAfter SSH works, nl numbers lines of a file so a practice list is easier to scan. You don't need extra software for this. Read a file without opening the editorAfter SSH works, print a file with cat so you can read it without opening nano. Short files only. You don't need a file viewer for this. Read a file one screen at a timeAfter SSH works, open a file with less so a long file does not flood the window. Space turns the page. q leaves. You don't need a file viewer for this. See the start of a fileAfter SSH works, print the first lines of a file with head so a long file does not flood the window. You don't need a file viewer for this. See the end of a fileAfter SSH works, print the last lines of a file with tail so a long file does not flood the window. You don't need a log viewer app for this. See how long a file isAfter SSH works, count lines with wc so you know if a dump will flood the window. You don't need a file manager for this. Pull one columnAfter SSH works, pull one column with cut so a mixed line is easier to scan. You don't need a file manager for this. Turn off password login once the key worksAfter the laptop key login is boring, tell SSH to stop accepting the password. The key is how you get in. A keyboard on the computer is the backup now.