Written 29 Aug 2026. This is a how-to, not a product card.
See the end of a file
After 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.
Read a file without opening the editor dumps the whole short file. Read a file one screen at a time pages from the top. When you only care about the newest lines at the bottom, tail prints those and stops. You are still only looking. It does not need a desktop, a log viewer, or a NAS for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. If the file is short and you want every line, that is read a file without opening the editor. If you want to turn pages from the start, that is read a file one screen at a time. If a house job broke and you need the computer's own diary, that is when something broke, look at the log. 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
tail prints the last lines of a file. You run it on the computer, after SSH. The file stays on disk. You are only looking. It does not dump every line. That is cat. It does not take over the window like a pager. That is less. It does not search for a word. That is grep. It does not pull the computer's system journal. That is when something broke, look at the log. One path, same computer, only the end.
Print the last lines
SSH in. Make a throwaway file that is long enough to have an obvious end:
seq 1 40 > ~/lines.txt
Then print the last lines:
tail ~/lines.txt
You should see 31 through 40. With no extra flags, tail prints the last ten lines and stops. That is the whole first-night trick.
A real file that is safe to practice on:
tail /etc/services
That list is already on Debian and Ubuntu. You are only looking. Don't edit it.
Useful extras, still looking only
Ask for a different count:
tail -n 5 ~/lines.txt
That prints the last five lines. Swap the number if you want more or fewer.
Need the first lines instead? That is see the start of a file. Tonight you are at the other end.
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 log viewer.
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 search for a word. That is find a word in a file. It is not a hunt for a file by name. That is find a file by name. It is not the computer's system journal. That is when something broke, look at the log. 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 to know if a dump will flood the window first? See how long a file is. 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 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 that never stops when you only care about the end. That dump is the wrong tool for a peek at the bottom. - Skip
tail -fon day one. That follows the file forever until you press Ctrl+C. Tonight you only want a snapshot of the end. - Skip
tailon photos, zip files, or programs. Those print junk. A text file is the job. - Skip
sudo journalctlif you only want the last lines of one ordinary file. The computer's own diary is when something broke, look at the log. - Skip buying a log viewer, a “cloud IDE,” or a NAS to read the end of 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 peek at files from a coffee shop. That is keep the computer on the house network.
Sources
Debian: tail. Ubuntu: tail. GNU coreutils: tail. 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 a word inside a file, see find a word in a file. For the computer's system journal, see when something broke, look at the log.