(Reprinted from my personal blog. Original post date: Aug. 30, 2016. Updated. Update #2: 23 May 2018, added link to FreeDOS edlin.)
“I’m a very technical boy.
So I decided to get as crude as possible.
These days, though, you have to be pretty technical before you can even aspire to crudeness.”
— William Gibson, Johnny Mnemonic
The writing advice people (and websites) are always harping about minimizing distractions. Shut off Twitter (or your social media of choice), close the browser, fill your screen with the editor, and just write look a squirrel! You can even buy special editors that fill the screen automatically… well, of course you can. Seems like everybody and their dogs are trying to make money off writers these days, aspiring and otherwise.
The thing is, it’s really easy to set up a distraction-free writing environment using the tools and apps that come standard with your operating system—at least for MacOSX and Linux. It’s less true for the Microsoft thing these days, but I can share the most important missing piece (read on). Both MacOSX and Linux evolved from Unix, an operating system that dates back to when computers were more expensive than displays. So you would have a bunch of people using one computer, typing commands and text into terminals. That was back when timesharing didn’t refer to a sketchy way to sell the same condo to 50 people.
The interesting part is, all the code needed to support that circa-1980 hardware is still part of modern operating systems, and we can use that code to create our distraction-free environment. So let’s get to a shell prompt, the way we all interacted with computers before 1984.
Down and Dirty
If I really wanted to get down and dirty, I’d get a USB-to-serial adapter and hook up that old VT220 terminal I still have laying around. But for now, we’re focusing on stuff you already have on your computer.
Personally, I like to have some music playing while I’m writing at home—it masks TV noise, kid noise, dog noise (unless there’s a thunderstorm, then she’s moaning under my feet), and noise from outside. But you might have a stereo in your writing room, or you find the music distracting, and you don’t need anything but a screen to type into.
Keeping the Johnny Mnemonic quote above in mind, Linux is more technical than MacOSX, so it’s easier to get to the crudeness you want using Linux. Press Ctrl+Opt+F1, and you’ll be presented with a glorious console with a login prompt. Most versions of Linux have six of these consoles; press Ctrl+Opt+F7 to get back to the graphical interface. I have never dug into the reason why Linux typically has six text consoles… I’m sure there’s a reason. Anyway, enter your usual login name and password at the prompts.
If you’ve set up MacOSX to automatically log you in when you start up… don’t. For one thing, you’re inviting anyone who sits in front of your computer to poke through your stuff. For another, you can’t get to the one console that Apple provides. To fix this, open System Preferences, select “Users and Groups,” then click “Login Options” at the bottom of your list of user names.
Once you’re there, make sure “Automatic login” is set to Off. Next up, set “Display login window as” to “Name and password.”
While you’re in this screen, make sure your regular user name is not an administrative account. Set up a separate admin account if you need to, and remember that admin password. These are things that make it harder for malware (or your teenage niece) to do things they shouldn’t be doing on your computer.
But I digress.
Next time you log in, instead of typing your usual user name,
>console and press Return.
This might not work on the newest versions of OSX for some reason,
but in older versions it immediately drops you into a text console
and presents you with a login and password prompt.
So… Linux or Mac, you have a text console until you press Ctrl+D at a shell prompt to exit. Skip down to “Now What?” to see what’s next.
Work Within the System
If you’re not quite ready to abandon
all hope the graphical interface entirely,
because you might need to jump onto the Web to goof off research something important,
you can still eliminate most distractions…
although all those distractions are still easily available if you can’t resist.
Perhaps it’s a small price to pay to have your music, right?
Most Linux systems make it really easy to get a terminal app on the screen,
whether through shortcuts or the application menu (look in Accessories or Utilities).
Macs aren’t much more difficult—press Cmd-space to pop up Spotlight;
term should be enough for it to complete Terminal
(it’s in /Applications/Utilities if you want to do it from the Finder).
Press Return, and it should start.
If you’re using the Microsoft thing, look for “Command Prompt” or “PowerShell” in your Start menu. One or both should be in Accessories. Use PowerShell if you have it; it’s easier to set up so it covers your entire screen. Right-click on the menubar and select Defaults to change the font size, window size, and colors (some detailed instructions). While you’re at it, set the taskbar to slide off the screen when not in use.
Now that you have some kind of terminal window up, you need to maximize it to keep the distractions at bay look a squirrel!. On Macs, press Ctrl-Cmd-F to enter full-screen mode (press it again to exit). On Linux, your distribution determines the keystroke; Ubuntu uses F11. You can always click the “maximize” button to expand the window, although this leaves extraneous window elements visible. To maximize a command window in the Microsoft thing, you have to set up its defaults to allow a wider window.
One of the advantages of a terminal app over a console: you can increase the text size, either by using the terminal app’s preferences or by using a keystroke (Cmd+ on Macs). 18 points should be sufficient on a laptop; you might want 24 points or even huger on a big desktop screen.
Okay, you’re ready to go…
Okay, now you have a screen full of nothing but white text on a black background.
There’s a prompt at the top, usually ending with a
The distraction-free writing paradigm basically turns your computer into an electronic version of a manual typewriter. No going back, no editing on the fly, just type your story and hope the result isn’t too incoherent to salvage (says the guy who likes to edit as he composes).
There are few lower-level ways to input text than using a line editor,
and Unix derivatives (including both Linux and MacOSX) include
Older versions of the Microsoft thing had a similar utility called
It’s not included on the latest versions, but you can get source code for a clone from
the FreeDOS project.
If you trust me, I’ve created a binary package you can put on your computer.
For this example, it’s identical to
ed, except it’s a little more chatty.
But again, I digress. Johnny Mnemonic, that technical boy, would have been proud of
It’s about as crude as it gets.
So let’s get crude!
ed and press Return.
Nothing happened. Or did it?
(as we’ll refer to
ed for a while) is a program of very few words,
which is exactly what you want when you’re going for a minimalist writing environment.
If you give Ed a command he doesn’t understand,
or one that might destroy your work, he will respond with
(a minimalist understands when that means “huh?”
or “you don’t really want to do that, right?”).
Ed’s commands all consist of a single character;
in some cases, you might include a range of lines or some other info.
But right now, there are three commands you really care about.
Right now, you should see a blank line.
i and press Return.
This enters input mode, where everything you type is copied into Ed’s buffer.
Ed will happily ingest everything you type, until you enter a line containing only a
That tells him to return to command mode. The following screen shot shows an example.
Now for the second command: saving what you entered.
w and the name you want to give the story.
Make sure you’re not using that name already, or you’ll overwrite what’s there!
I reserve a few file names like
tmp for situations like this,
when I either don’t need to keep what’s in the file
or plan to do something else with it right away (like copy it into Scrivener).
Anyway, after you use the
Ed responds with the number of characters it wrote into the file.
If you want a rough word count, divide by 5
(I wrote 1458 characters, a shade under 300 words, in the above example).
q and press Return, and you’ll return to the shell prompt.
If you want to keep writing instead, type
$a and press Return.
This command means “go to the last line” (
$) “and append.”
Again, Ed will take everything you type as input
until you enter a line containing only a
This time, you can just type
w and press Return,
because Ed remembers the last file name you used.
Just remember to use
q when you’re done.
Now you’re at the shell prompt, and you want to know exactly how many words you typed?
wc and the file name, and press Return.
The info you get looks like this (using the above example):
Kahuna:fiction larry$ wc tollen.md 31 269 1458 tollen.md Kahuna:fiction larry$
You get three numbers: lines, words, and characters. So that number in the middle, 269, is the actual number of words I wrote.
If you’re not enamored with Ed’s ultra-minimalism, try entering
Both of these are simple screen-oriented text editors
that include a little help at the bottom of the screen
(but will let you arrow back and noodle with the text).
On the Microsoft thing, there’s
which gives you a screen-oriented editor with a lot of color.
Like with any writing tool, you’ll improve with practice. Don’t give up right away; try a different editor or even a different color scheme (most terminal apps let you choose colors). And don’t forget to copy your text into your normal writing tool!
Have you ever tried a minimalist writing environment? How did it work? Get as detailed (or as minimalist) as you like in the comments.
Subscribe via RSS