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

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

Number lines

After SSH works, nl numbers lines so a long file is easier to point at. You don't need a file manager for this.

Join columns side by side kept two lists as one line each. Tonight you number lines so you can say look at line 3. nl does that. Long files get numbers in the window. You are still only looking on the computer. 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 columns joined are what you want, that is join columns side by side. If a whole dump with no numbers is what you want, that is read a file without opening the editor. If a number list from scratch is what you want, that is print a number list. 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

nl numbers lines. You type nl, then a file. Default numbers are body lines: text lines get numbers, blank lines usually don't. -ba is optional all lines, blanks included. It prints numbered lines. It does not rewrite the file unless you ask it to.

It is not seq. Seq makes numbers from scratch. Nl labels lines you already have. It is not cat. Cat dumps without numbers. It is not cat -n as this lesson. Tonight the tool is nl.

Number lines from a practice file

SSH in. Make a tiny file in home:

printf 'apple\nbanana\npear\n' > ~/fruit.txt

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

cat ~/fruit.txt

You want apple, then banana, then pear. Now number lines:

nl ~/fruit.txt

You want 1 then apple, 2 then banana, 3 then pear. The file on disk is still three fruit lines with no numbers baked in. That is the whole first-night trick: numbers in a window, file left alone.

Need blank lines numbered too? Make a file with a blank in the middle:

printf 'apple\n\nbanana\n' > ~/fruit.txt

Default nl numbers apple and banana, and skips the blank line. Number every line including blanks:

nl -ba ~/fruit.txt

You want 1 apple, 2 on the blank line, 3 banana. -ba is optional. Default body lines are enough for tonight.

If it says command not found for nl, 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 ~/fruit.txt

Careful delete only. That is delete a file carefully.

Useful extras, still looking only

Need narrower numbers and a clearer separator?

nl -w2 -s'. ' ~/fruit.txt

-w2 is width. -s'. ' is separator after the number. Skip fancy section numbering tonight. Plain nl is enough for first look.

Some pages mention cat -n. That also prints numbers. Tonight the tool is nl. Skip cat -n as this lesson.

Skip files under /etc, SSH settings, sed, awk, xargs, and huge logs tonight. 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 columns joined. That is join columns side by side. It is not seq. Seq makes numbers from scratch. That is print a number list. It is not wrap of long lines. That is wrap long lines.

What next

Need long lines wrapped? Wrap long lines. Need columns joined first? Join columns side by side. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.

Skip

Sources

GNU coreutils: nl invocation. Debian: nl. Ubuntu: nl. Official pages only. For the login, see SSH from the couch. For columns joined, see join columns side by side. For wrap, see wrap long lines. For numbers from scratch, see print a number list.

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. Join columns side by sideAfter SSH works, join columns side by side with paste so two lists become one line each. 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. Change charactersAfter SSH works, change characters with tr so a mixed line is easier to clean. You don't need a file manager 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. 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 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. Wrap long linesAfter SSH works, wrap long lines with fold. You don't need extra software 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.