How to photograph your finished shell scripting work

A finished shell script is mostly text, so a clean screenshot often does the job. A photograph earns its place when you need to show the machine, terminal window, notes, or physical setup that produced the result. Treat it as evidence: command, output, and context should be legible without explanation.

The aim is not a moody desk shot. Work at 1920 × 1080 or higher, keep the terminal font at 16–18 pt, and allow 20–30 lines of output on screen. Anything smaller turns to grey mush when resized for a blog.

Decide what the photograph must prove

Write one sentence describing the point of the image. “Shows the script printing a sorted list” is useful; “my desk” is not. A finished-work photograph usually needs one wide frame for context and one detail frame for the command and output. Keep the prompt visible, because it shows where the command was run. Include the script name and a short output, not 200 lines of scrolling text. If the result is a file, show the file listing beside the terminal at a readable size. Redact anything private before the shutter opens: API keys, tokens, usernames, IP addresses, customer names, and full paths that reveal a real name. Use dummy data if unsure.

Prepare the terminal before the camera appears

Set the terminal window to roughly 120 characters wide and 30 lines high, or use a 16:9 window at 1920 × 1080. Increase the font to 16–18 pt and line spacing to about 1.2. Use light grey or white text on a dark background; mid-grey on black photographs poorly. Hide desktop icons, notifications, and chat windows. Clear old output so the frame contains only the command and result you want to discuss. Set the prompt to something short and neutral, then run the command once to check that the output fits. Give yourself 5–10 minutes for this preparation; it saves more time than editing afterwards.

Choose a screenshot when text is the point

If the image only needs to show code and output, use a screenshot. It is sharper, colour-accurate, and free of screen glare. Photograph the screen only when physical context matters: a monitor, keyboard, notebook, Raspberry Pi, or hardware test rig. For a screenshot, capture at 1920 × 1080 or 2560 × 1440, crop to the terminal, and export at 2000 px on the long edge. For a photograph, use a camera or phone on a tripod. A 35–50 mm equivalent lens at 50–70 cm from the screen gives a natural view without the distortion of a wide phone lens. Avoid digital zoom; move the camera instead.

Control glare with one soft light

Turn off overhead lights and close blinds behind the camera. Use one soft light at about 45 degrees to the screen, roughly 50–80 cm away, with a colour temperature of 5000–6500 K. Set the monitor brightness to 70–80% and open a dark terminal theme; this reduces the chance of a washed-out grey rectangle. If a window is reflected in the screen, move the camera 10–20 cm to one side rather than tilting the screen. Check from the camera position: if you see a bright lamp or window, so will the camera.

Frame square to the screen, then crop

For legible text, keep the camera level with the centre of the screen and square to it, within about 5–10 degrees. A strong angle creates keystone distortion and makes text look wrong. Include 2–3 cm of the monitor bezel so the image reads as a screen, not a floating rectangle. Use the grid or level display. Focus on the prompt line, not the middle of the screen, then take 3–5 frames. If you want a workspace shot, move back to 70–90 cm and accept that the terminal text will be smaller; add a separate detail frame rather than cropping a wide shot until the letters fall apart.

Set exposure and colour for legible code

Use manual exposure if you can. Start at ISO 100–400, f/5.6–f/8, and 1/60–1/125 second. The smaller aperture gives more depth of field if the screen is not perfectly parallel to the camera. Use a 2-second timer or a remote release; pressing the shutter by hand adds blur at these distances. Expose so white text sits at about 80–90% brightness, not clipped to pure white. Check the histogram: a spike against the right edge means the text has lost detail. Set white balance to 5000–6500 K or use a custom reading from a white sheet of paper. Shoot JPEG at the highest quality, or raw if you will edit; either is fine for a blog.

Diagnose the soft, banded or glaring image

Symptoms: letters look soft even though the camera says it focused; faint horizontal bands cross the screen; colours shift towards green or magenta; a bright rectangle sits over the terminal. Likely causes: the camera locked onto the bezel or a reflection, the shutter speed is too close to the screen refresh rate, the white balance is fixed for daylight, or a room light is reflecting off the glass. The fix: put the camera on a tripod, switch to a 2-second timer, focus manually on the prompt, and use 1/60–1/125 second. Move 5–10 cm closer or further away and reframe; this often removes moiré. Set the monitor to its native resolution and 60 Hz, then turn off any dynamic contrast setting. If the text is still soft, take a screenshot instead. A sharp screenshot beats a blurry photograph every time.

Edit, caption, and publish without faking the result

Crop to 3:2 or 16:9, straighten the screen edges, and remove dust spots. Do not over-sharpen: a light amount is enough at 2000 px. Export as sRGB JPEG at 80–90% quality, with the long edge at 2000 px for a blog. Keep the original file and the exported copy in separate folders. Write a caption that gives the command, the shell, the date, and the purpose in one or two sentences. If you edited out a mistake, say so; the photograph should document the finished work, not pretend the session was flawless. A caption such as “Bash 5.2, Ubuntu 24.04, 14 March: the script prints the three largest files” is more useful than “terminal screenshot”.

Before publishing, check five things: no secrets or personal paths are visible; the prompt and command are readable at phone size; the output fits without horizontal scrolling; there is no glare across the text; and the caption explains what the image proves. A retake takes 2–3 minutes, while a corrected post takes much longer. Save the final image with a descriptive filename, such as sort-files-output-2024-03-14.jpg, and note the terminal size and font used so you can repeat the look next time.

FAQ

Do I need a DSLR or mirrorless camera?

No. A modern phone on a tripod can photograph a terminal well if you use the main lens, avoid digital zoom, and control reflections. A dedicated camera helps with manual focus and exposure, but it is not required for a beginner blog post.

How do I photograph a terminal without glare?

Turn off overhead lights, close blinds behind the camera, and use one soft light at 45 degrees. Set the monitor to 70–80% brightness and move the camera 10–20 cm sideways if a reflection remains. If glare still wins, take a screenshot.

Should I edit the screenshot or the photograph?

Edit for legibility, not beauty. Crop, straighten, and correct white balance; do not erase output or change the command. Export at 2000 px on the long edge in sRGB. Keep the original so your edit can be checked.