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

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

See the start of a file

After 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.

Read a file without opening the editor dumps the whole short file. Read a file one screen at a time pages from the top. See the end of a file prints the newest lines at the bottom. When you only care about the opening lines, head prints those and stops. You are still only looking. It does not need a desktop, a file 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 the newest lines at the bottom, that is see the end of a file. If you want to turn pages from the start, that is read a file one screen at a time. 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

head prints the first 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 print the end. That is tail. It does not search for a word. That is grep. It does not ask what kind of file this is. That is file. One path, same computer, only the start.

Print the first lines

SSH in. Make a throwaway file that is long enough to have an obvious start:

seq 1 40 > ~/lines.txt

Then print the first lines:

head ~/lines.txt

You should see 1 through 10. With no extra flags, head prints the first ten lines and stops. That is the whole first-night trick.

A real file that is safe to practice on:

head /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:

head -n 5 ~/lines.txt

That prints the first five lines. Swap the number if you want more or fewer.

Need the last lines instead? That is see the end of a file. Need a line count before a dump? That is see how long a file is. Need to know if the path is even text? That is see what kind of file this is.

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 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 peek at the last lines. That is see the end of a file. It is not a line count. That is see how long a file is. It is not asking what kind of file this is. That is see what kind of file this is. It is not a compare of two files. That is see whether two files are the same. 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 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 only the newest lines at the bottom? See the end of a file. Need to know if a dump will flood the window first? See how long a file is. Need to know if the path is text before you dump it? See what kind of file this is. Need to see if a spare still matches? See whether two files are the same. 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

Sources

Debian: head. Ubuntu: head. GNU coreutils: head. Official pages only. For the login, see SSH from the couch. For a short dump, see read a file without opening the editor. For the end of a file, see see the end of a file. For paging, see read a file one screen at a time. For a kind-of-file check, see see what kind of file this is.

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. 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 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 app for this. Read a file one screen at a timeAfter SSH works, open a file with less so a long file does not flood the window. Space turns the page. q leaves. You don't need a file 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. See what kind of file this isAfter SSH works, ask what kind of file this is with file before you dump it. You don't need a file viewer 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 what's in a folderAfter SSH works, list the folder you are sitting in with ls. You don't need a file manager for this. Edit a file from the couchAfter SSH works, open a file with nano, change a line, and save. The keys at the bottom of the screen are the whole trick. You don't need a new editor. 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.