Filed under "Other"

My Son’s First Linux Command

by Bill Brooks  • 

My son is five years old and a digital native. For the last year or so he’s been saying that he wants to develop video games when he grows up. I’ve acknowledged his desire, telling him that he can develop video games, but that he’d need to learn how to write code and work hard. When he recently brought up his plan again I finally said, “Okay, lets do it.”

We sat down and talked about what he wanted his game to do. His first idea was a Minecraft type game with dinosaurs, I told him that was a good end goal, but that we needed to start smaller, something simple. I asked him what he wanted the goal of his game to be about, he said slaying a dragon. Then I asked him how he wanted the game to start, and he chose waking up in a cave. We then began designing our text-based adventure.

I used this opportunity to teach him the echo command. Echo is the simplest of commands, returning whatever string of text or variables is typed into the command. It’s also a great command to use to learn your first script.

He really enjoyed echo because of the instantaneous feedback. We started with “Hello World!” which seems traditional when learning any type of coding. We edited the command string so that it said hello to him and then I showed him how you can include it in a script and have inputs to it. We started with:
echo "Hello $1!"

He started picking words like underpants or fart so that the command sh fart would say “Hello fart!” and then laugh and laugh. I then showed him that you could have multiple inputs and that you could call a script from within a script. After playing around with that for awhile we started writing the game.

“You wake up in a deep cave. There are two passages. Do you want to go [up] towards the light or [down] towards the dark?”

My son was on his way…

Photo by Roberto Taddeo

Find out more about ServInt solutions

Starting at $69

  1. This week on the ServInt Source: Teaching a five year old Echo and the inevitable path towards "Hello fart!"
Bill Brooks

Bill Brooks

Escalated Technician, ServInt

Bill Brooks is an Escalated Technician and the Continuing Education Facilitator for ServInt’s Managed Services Team. He is a life-long tech enthusiast and enjoys music, video games and hockey on the side.

  • The New York Times
  • The Hill
  • Bloomberg
  • The Seattle Times
  • Computer World
  • Ars Technica