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

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

Drop duplicate lines

After SSH works, drop duplicate lines with uniq so a mixed list shows each line once. You don't need a file manager for this.

Put lines in order put a mixed list in A-to-Z order. Tonight you find repeated lines: uniq. Uniq drops duplicate lines that sit next to each other. Sort first, then uniq. You are still only looking. The computer does not need a file manager for this one job.

Skip until SSH already works

SSH from the couch should already get you a prompt. If order is what you want, that is put lines in order. If one column pulled is what you want, that is pull one column. If a search is what you want, that is find a word in a file.

What this is

uniq drops duplicate lines that sit next to each other. Unsorted copies that are apart stay. Start with sort ~/fruit.txt | uniq. -c counts. -d prints only copies. It is not sort. Sort puts lines in order. It is not grep. Grep finds a word.

Drop copies from a practice list

SSH into the computer. Make a tiny mixed list:

printf 'pear\napple\nbanana\napple\n' > ~/fruit.txt

cat ~/fruit.txt

Uniq alone on mixed order often keeps both apples, because they are not neighbors:

uniq ~/fruit.txt

Sort first, then uniq:

sort ~/fruit.txt | uniq

You want apple, banana, pear, each once. That is enough for tonight. Practice only in home.

Debian and Ubuntu usually already have uniq. Don't make apt the job. If uniq is missing:

sudo apt install coreutils

Then stop. That install is not the lesson.

When you are done, throw the practice files away. Careful delete only. That is delete a file carefully. Skip rm -rf.

rm ~/fruit.txt ~/fruit-unique.txt

Useful extras, still looking only

Optional: save while you watch:

sort ~/fruit.txt | uniq | tee ~/fruit-unique.txt

cat ~/fruit-unique.txt

Optional: counts:

sort ~/fruit.txt | uniq -c

Optional: only the copies:

sort ~/fruit.txt | uniq -d

Optional: names in this folder, unique:

ls | sort | uniq

Looking only. Skip uniq piped into rm.

What this is not

This is not sort. That is put lines in order. It is not cut. That is pull one column. It is not tee. That is watch and save output at once. It is not grep. That is find a word in a file. It is not diff. That is see whether two files are the same. It is not opening SSH to the internet. That is keep the computer on the house network.

What next

Need order first? Put lines in order. Need one column? Pull one column. Need a search? Find a word in a file. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.

Skip

Sources

GNU coreutils: uniq invocation. Debian: uniq. Ubuntu: uniq. Official pages only. For the login, see SSH from the couch. For order first, see put lines in order.

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. Put lines in orderAfter SSH works, put lines in order with sort so a mixed list is easier to scan. 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. Send output into another commandAfter SSH works, send output into another command with | so a long dump does not flood the window. You don't need a file manager for this. Watch and save output at onceAfter SSH works, watch and save output at once with tee. You don't need a file manager for this. Save output to a fileAfter SSH works, save output to a file with >. You don't need a file manager for this. Find a word in a fileAfter SSH works, search a file with grep so you see only the matching lines. You don't need a file viewer for this. See whether two files are the sameAfter SSH works, compare two files with diff so you can tell if the spare still matches. You don't need a file viewer 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.