Written 1 Sep 2026. This is a how-to, not a product card.
Finish disk writes
After printf, sync finishes pending disk writes so practice files and USB copies are really on disk before you unplug or power off. You don't need extra software for this.
Print words exactly put exact words into a practice file. Tonight you do the last step before you unplug a USB stick or power the computer off. Flush what is still buffered. sync means flush those pending disk writes. Silence means the kernel finished what it had pending.
That is not seeing whether a USB disk showed up. That is see if the USB backup disk showed up. That is not a full shutdown. That is shut down without yanking the plug. You are still only practicing. It does not need htop, Grafana, or a NAS for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. If you only need to write practice words, that is print words exactly or put a short line into a file. If you only need to see whether a USB stick appeared, that is see if the USB backup disk showed up. Skip this whole note if you only want free disk space. That is see if the computer still has room.
What this is
sync asks the computer to finish writing buffered data to disk. Linux often parks writes in memory for a moment so the disk is not hit on every keystroke. That buffer is normal. sync flushes it. Tonight: one quiet sync after a practice write.
Silence and the prompt back means the flush finished. It does not print a progress bar. It does not invent a USB mount. It does not power the computer off.
Practice sync
SSH in.
Make sure home is where you sit:
pwd
You want a path that ends in your login name.
If the path is wrong, run this:
cd ~
Optional: park one short practice line so you have something to flush:
printf 'hello\n' > ~/sync-a.txt
Then finish disk writes (tonight's job):
sync
You want silence, then the prompt back. That silence means the computer finished flushing what the kernel had pending. That is enough for tonight.
Optional peek without opening the editor:
cat ~/sync-a.txt
You should see that same short line. Don't make cat the lesson. When you are done practicing:
rm -i ~/sync-a.txt
Ask first. Say yes only if the name matches. That careful delete is delete a file carefully. Skip rm -rf.
Debian and Ubuntu usually already have sync. Don't make apt the lesson.
Useful extras, still home-safe
Optional: run sync again. A second sync is harmless. Some people type it twice out of habit before they unplug a stick. You don't need twice. One quiet flush after the write is enough for tonight.
Skip using sync as a reason to yank a USB stick without checking the mount. Seeing whether the stick showed up is see if the USB backup disk showed up. Confirming a backup copy is check that the backup actually copied.
Skip dd and shred as tonight's job. Tonight: a quiet flush after a tiny practice write, not a disk image or a wipe. Skip dropping caches. Skip piping sync into rm. Skip huge dumps of /etc, disks, or logs.
Skip screen, tmux, apt as the lesson, htop, Grafana, and a NAS. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.
What this is not
This is not printf. That is print words exactly. It is not echo. That is put a short line into a file. It is not seeing whether a USB disk showed up. That is see if the USB backup disk showed up. It is not a full power-off. That is shut down without yanking the plug.
What next
Need a peek at file bytes? Peek at file bytes. Need to empty or shrink without deleting the name? Empty or shrink a practice file.
Skip
- Skip if SSH still fails. Finish SSH from the couch first.
- Skip
printforechoas tonight's job if you only came to flush. Those write notes already exist. - Skip using
syncas permission to yank a USB stick without checking the mount. That check is see if the USB backup disk showed up. - Skip shutdown as tonight's job if you only need a flush. That is shut down without yanking the plug.
- Skip
dd,shred, dropping caches, andsyncintormas tonight's job. - Skip huge dumps, files under
/etc, htop, Grafana, and a NAS. - Skip
rm -rf. Careful delete only: delete a file carefully. - Skip opening SSH to the internet. That is keep the computer on the house network. Don't forward port 22.
Sources
Debian: sync(1). Ubuntu: sync(1). Official pages only. For exact words, see print words exactly. For a short line, see put a short line into a file. For the USB look, see see if the USB backup disk showed up. For a careful delete, see delete a file carefully. For the login, see SSH from the couch.