Written 29 Aug 2026. This is a how-to, not a product card.
See how long a file is
After 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.
Read a file without opening the editor dumps the whole short file. Read a file one screen at a time pages from the top. Before you print a mystery file, wc tells you how many lines it has. You are still only looking. It does not need a desktop, a file manager, or a NAS for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. If you want every line of a short file, that is read a file without opening the editor. If you want the last lines, that is see the end of a file. If you want room left on the disk, that is see if the computer still has room. 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
wc counts lines, words, and bytes. You run it on the computer, after SSH. The file stays on disk. You are only looking. It does not dump the words. That is cat. It does not take over the window like a pager. That is less. It does not print the last lines. That is tail. It does not tell you how much disk is free. That is see if the computer still has room. One path, same computer, a count.
Count the lines
SSH in. Make a throwaway file that is long enough to have an obvious count:
seq 1 40 > ~/lines.txt
Then count it:
wc ~/lines.txt
You should see three numbers, then the name. Lines, words, bytes. For seq 1 40 that is 40 lines. That is the whole first-night trick.
A real file that is safe to practice on:
wc -l /etc/services
That list is already on Debian and Ubuntu. You are only looking. Don't edit it. -l prints the line count only, which is the number you want before a dump.
Useful extras, still looking only
Ask for lines only, on your throwaway file:
wc -l ~/lines.txt
A small number is safe to cat. A huge number belongs to less or tail, not a dump of the whole file.
Need the byte size of one file instead? That is already on see what's in a folder as ls -lh. Tonight you are counting lines, not shopping for a bigger drive.
If you see command not found, install the usual tools, then try again:
sudo apt install coreutils
Debian and Ubuntu Server usually already have it. That install is not a reason to buy a file manager.
When you are done practicing:
rm -i ~/lines.txt
What this is not
This is not a dump of the whole file. That is read a file without opening the editor. It is not paging through every line from the top. That is read a file one screen at a time. It is not a peek at the last lines. That is see the end of a file. It is not a search for a word. That is find a word in a file. It is not how much disk is free. That is see if the computer still has room. It is not which folders are huge. That is see which folders are eating the disk. It is not an editor. That is edit a file from the couch. It is not a house share other computers browse. That is a folder the house can open.
What next
Need a short file printed all at once? Read a file without opening the editor. Need the whole long file one screen at a time? Read a file one screen at a time. Need only the newest lines at the bottom? See the end of a file. Need only the lines with one word? Find a word in a file. Forgot which folder holds the file? Find a file by name. Need to change a line? Edit a file from the couch. Need a spare before you edit? Copy a file without leaving the computer. Need the throwaway gone for real? Delete a file carefully. Need a file from the laptop instead? Copy a file to the computer from your laptop. When a house job broke, look at the computer's own diary: when something broke, look at the log. When key login is boring on every computer you use, turn off password login once the key works. 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
caton a file you have not counted yet if the computer already flooded the window once. Count first, then picklessortail. - Skip
wcif you only want room left on the disk. That is see if the computer still has room. - Skip
wcon photos, zip files, or programs. Those counts are not useful. A text file is the job. - Skip buying a file manager, a “cloud IDE,” or a NAS to count the lines in one text file.
- Skip SSH settings,
/etc/shadow, and anything under/etc/ssh. Looking at trusted laptop keys is see which laptop keys the computer already trusts. - Skip opening SSH to the internet so you can count files from a coffee shop. That is keep the computer on the house network.
Sources
Debian: wc. Ubuntu: wc. GNU coreutils: wc. Official pages only. For the login, see SSH from the couch. For a short dump, see read a file without opening the editor. For paging, see read a file one screen at a time. For the last lines, see see the end of a file. For disk room, see see if the computer still has room.