Written 1 Sep 2026. This is a how-to, not a product card.
Print words exactly
After a temporary practice file, printf prints words exactly. Echo always adds a newline.
Make a temporary practice file gave you a unique name. Tonight the computer prints words exactly with printf. Printf prints the characters you typed. If you want a newline, you type \n yourself.
That is not echo. Echo always adds a newline. That is put a short line into a file. You are still only practicing on the computer. The computer does not need extra system software, htop, Grafana, or a NAS for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. SSH means type commands from your laptop, on the house network. If a short line with an automatic newline is what you want, that is put a short line into a file. Skip echo as tonight's job.
If the editor is what you want, that is edit a file from the couch. Skip nano as tonight's job.
What this is
printf prints characters exactly. The usual command tonight is printf 'hello\n'. The command prints hello, then a newline because you typed \n. Tonight: that safe peek: hello, then the prompt on the next line. You don't need extra system software for this.
It is not echo. Echo always adds a newline. It is not format-string school. Tonight: exact words plus the newline you typed.
Practice printf
SSH into the computer.
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 ~
Print hello and a newline you typed:
printf 'hello\n'
You want hello, then the prompt on the next line. You typed the newline as \n. That is enough for tonight.
Debian and Ubuntu usually already have printf. Don't make apt the lesson.
If printf is missing, install coreutils:
sudo apt install coreutils
Then stop. That apt line is not the lesson.
Useful extras, still home-safe
Optional: park exact words in a tiny home practice file:
printf 'hello\n' > ~/printf-a.txt
Then peek:
cat ~/printf-a.txt
You want hello on its own line. Don't make redirect or cat the job. When you are done, delete only that practice file:
rm -i ~/printf-a.txt
Ask first. Say yes only if the name matches. That is delete a file carefully. Skip rm -rf.
Optional peek without a newline:
printf hello
You want hello and the prompt on the same line. That shows why \n matters. You can stay on printf 'hello\n'.
Skip huge dumps as tonight's job. Skip printf piped into rm. Printf prints words. Rm deletes files. Don't mix those jobs. Skip format-string school (%s, %d, %x, width flags). Skip files under /etc, whole /, SSH folders, and USB sticks. Practice in the computer window. Optional home practice file only.
Skip screen, tmux, 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 echo. Echo always adds a newline. That is put a short line into a file. It is not the editor. That is edit a file from the couch. It is not redirect as the main job. That is save output to a file.
What next
Need disk writes finished before you unplug or power off? Finish disk writes. Need a short line that always adds a newline? Put a short line into a file.
Skip
- Skip if SSH still fails. Finish SSH from the couch first.
- Skip
echoas tonight's job. Echo always adds a newline. That is put a short line into a file. - Skip
nanoand redirect as the main job. Those notes already exist. - Skip huge dumps, format-string school, and
printfpiped intorm. - Skip apt as tonight's job. The coreutils aside is not the lesson.
- Skip htop, Grafana, a NAS, files under
/etc, and whole/. - 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: printf(1). Ubuntu: printf(1). Official pages only. For a short line with an automatic newline, see put a short line into a file. For a temporary practice name, see make a temporary practice file. For saving output, see save output to a file. For a careful delete, see delete a file carefully. For the login, see SSH from the couch.