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
- Skip if SSH still fails. Finish SSH from the couch first.
- Skip sort, cut, tee, and grep as tonight's job. Those pages already exist.
- Skip uniq without sort if copies are not neighbors. Sort first.
- Skip uniq piped into
rm. - Skip files under
/etc, SSH folders, or paths you don't own. Practice only in home. - Skip
rm -rf. Careful delete only: delete a file carefully. - Skip opening SSH to the internet so you can do this from a coffee shop. That is keep the computer on the house network. Don't forward port 22.
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.