My son is 7½ years old and goes into second grade. We are not native English speakers – as the matter of fact, English is only his third language after Serbian and German. He knows maybe 100 English words, yet he managed to learn and deliberately apply 4 bash commands after just 1 hour of “studying” with me! I wanted to share this story to demonstrate what kids can effortlessly do if we give them just a bit of nudge, even in this time of flashy apps and games. I will reconstruct our “learning” session in the form of dialogue.

So how did we do it?

My son occassionally observes that I use some “strange” apps on my computer (like IDE, terminal/shell etc.) that look completely different than “normal” apps like word processor, spreadsheet etc. A few days ago he watched as I typed into terminal and asked if he could type whatever I said. Instinctively I wanted to say no, but this opportunity to try to show him a bit of bash/Linux/terminal was just too good to be missed!

“Sure, let’s do it,” I replied. “Sit next to me.”

“What shall I type dad?”

echo Vasa” (his name is Vasa)

He typed and saw immediately that Vasa was printed out below. “Hey it says Vasa here!” he said surprisedly.

“Great, now type echo Ivan

“Now it says Ivan.”

“Did you notice that one line above it said Vasa but now it’s Ivan?”

“Yeah, but why?”

“If you type echo <anything>, the computer will write <anything>.”

That was enough to make him curious. He started typing echo <word> for about 5-6 words, and then echo <lyric from his favorite song>. He was very satisfied when he saw that lyric printed out. Less than 10 minutes into this, one command down!

“Look at this,” I said, “type ls.” He sees strange output and, of course, doesn’t have a clue what it is.


“Ummm…” I started thinking about files, directories, extensions but I knew I had to keep it simple, mysterious and interesting at the same time. “It’s just some names. Your name is Vasa. Imagine that some things have names like emails.txt or sqlite. That’s how we call them. I’ll now type ls -al

The output looks completely different and he starts reading it out. “d r w minus r minus minus…” I interrupt him briefly. “Hey look at the right side, see these names? Aren’t they the same as before?” I pointed out file names from the ls output. He still doesn’t know what it is but confirms they are the same. “You can always type ls -al and the computer will tell you what files are there.” He types 2-3 times just to try it. I know he can’t comprehend it yet, but after 15 minutes it’s two commands down.

“Now I’ll show you something crazy! Type touch vasa.txt

He types it and asks “OK, now what?”

ls -al

He types that too and notices “Hey something is different.” He counts lines of output. “Wait, now there are 8 lines, and before… 1, 2, 3… Before there were 7!”

“Yes! You’ve just created something. You’ve created a file with the name vasa.txt. And look here,” I point at file creation date and time, “it says it’s created today at 22:18.”

He looks at the clock “Hey that was a minute ago! Huh?” I think that, at this moment, he realized he really brought something into existence on a real computer.

He takes over and goes into a loop - touch <word>.txt followed by ls -al for 5-6 times. He goes a tad haywire here, and his files are named poop.txt, butt.txt and the like, followed by a lot of laugh from both of us. Now I’m sure he mentally connected touch and ls as a clear cause and effect and finally both make sense now. Half an hour, three commands, yay!

It’s time for heavy artillery. My son can’t touch type yet (you don’t say!) so I have to make him faster. “Look at this trick, if you press up arrow, the computer will write previous command again. And if you press up arrow two times, you’ll see previous previous commmand. You don’t have to type it again! Neat, huh?”

He presses up arrow once, sees ls -al and presses Enter. Now we’re talking about excitement. It’s time for another round of touch and ls -al but this time it’s touch and up arrows actually. Three minutes later we have a few more files and “up arrow to repeat past command” in his muscle memory. Not too bad.

It’s getting late but he seems to still have a bit of oil in the tank. Enough of creation, it’s time for destruction! “I have another trick for you. Type rm vasa.txt

He types it, immediately followed by up arrow twice to call ls -al. “Huh, where is vasa.txt?”

“It’s gone. rm means remove, and in English it’s like delete. So it deleted your file named vasa.txt.”

“And I can delete all of those I created?”


He goes on another spree of rm <something> followed by ls -al. I let him for a few minutes before dropping another bomb. “Look at this trick! Type rm and one or two letters of some name and press TAB.”

“What’s tab?”

“This key with left and right arrows.”

He couldn’t believe when the computer completed file name. “Dad how is it possible?!”

“Well the computer knows there is a file whose name starts with these two letters. Smart people made this program so you can press TAB and it will add the missing letters for you.”

I think that at this moment he’s seriously impressed. Here we go, a loop of rm <something>TAB followed by up arrow up arrow Enter for ls -al. Almost all of his files are gone, with a lot of laugh again when rm fa<TAB> expanded to rm fart.txt.

I feel it’s time to wrap it up for the evening. An hour already passed but if anything it’s an hour well spent. We covered echo, ls, touch and rm plus repeating of commands and basic expansion. He is full of excitement: “I must tell mum tomorrow about touch and ls and everything!”

“Sure, she’ll be thrilled to hear that,” I wink. “Let’s brush your teeth young man, it’s high time for bed.”

As I put him to sleep, I can’t help but wondering what would have happened if I did another 10 bash sessions with him?