Learn Sections

Josh · Posted · Updated · 6 min read

How it works underneath:

Nothing runs on a server. This is again, the most important part of me. I don’t ever want this project to start costing me monetarily without it first generating money and I have no plans for that part yet. Each “machine” is a simulation written in TypeScript that runs inside the browser. There is no Linux box or Cisco VM behind it. Obviously that it a dealbreaker for this project because it means:

  • You can’t break anything (hopefully not, but I’ve tried and feel pretty confident).
  • it costs nothing to host
  • it works instantly with no sign-up or “Spinning up VM, please wait”

A machine is just data plus rules. For example, it takes your input and prints output that pertains to that question. There is some freedom to find the question on your own. Like for the Windows CMD Terminal Practice, “ipconfig” and “ping” both work since they could independently give you information for your final answer but it won’t let you do anything much higher like installing different apps or breaking out of the system.

I always wondered how these Certification Exams or my college’s simulations worked. When you type “help” it only lists 5-6 commands that pertain to your question and not much else. Obviously that wasn’t a “real” Linux terminal but rather a simulation of the terminal that’s stripped away and only acts like a Linux terminal. Pretty interesting stuff.

How it all works together:

Every challenge is started automatically. When a user clicks onto the Terminal Practice section - it starts on a fresh machine and waits for an answer. The machine will only display “Solved” on a correct, perfect answer for that question. You are free to enter as many commands as you want to come to the right answer but the question will never be marked as complete until you answer it the way that question needs. I had to add in a “Reset Machine” option since I kept intentionally breaking it and I didn’t want some Terminal noob to do the same and it ruins their streak.

Every new test, category or distro was created on my Ubuntu VM, then on a preview Azure site for testing purposes before it was merged. This was so that I could test the functionality since each of these distro’s (using that term loosely) have widely different confirmation and command inputs. The general game was the same but I wasn’t to make sure I couldn’t break anything serious before merging to the prod website.

Timeline:

All of these were built in pull requests (PRs), each tested (with some help from Claude Code or I’ll be sitting here forever) and previewed before going live:

  1. Linux Terminal Practice (PR #6): It was my first idea that came to mind before starting on this website so it figured it should be first and ideally the easiest to implement. I know Linux commands the most, MAYBE Windows CMD commands section due to my time at Geek Squad so it was an easy implementation. I decided to split the “Linux” category into two natural different distro’s - Debian and red hat which were represented as Ubuntu and Rocky machines. The game idea (lives, streaks, exam mode) all came at this point as well but got polished later on.
  2. Windows Powershell (PR #7): a pretend Windows Server, with the object pipeline. I truthfully don’t know a whole lot about Powershell. It’s on my list of “things to learn” (Maybe I’ll add this list to this website to keep myself focused) but I haven’t gotten around to diving keep into it. I’m a Linux only user (Nobara Linux for the win. That SH#T just works like a dream) so I rarely ever NEED to use Powershell but here it is for my own practice.
  3. Command Prompt (PR #8): The classic Windows shell on the same server (my personal favorite).
  4. Cisco IOS (PR 9): A switch and router with real IOS modes and config. I used to have a Cisco Router to play around with but never learned every single command. the CCNA exam is on my list but still 1-2 years off, probably after my Degree. I used Claude Code to write a lot of these questions and verify functionality.

Speed Bumps along the way - Lessons Learned:

  • “help” didn’t work on Cisco. The top page of the terminal was copied from Linux and Windows and still said “Type “help for a list of commands…” which doesn’t work. Since Claude Code tested this section and I don’t know much about Cisco commands, my final test was the “help” command which said “command not found”. Glad I tried that before merging to the production website for PR 9. It is now fixed and now works with both ”?” and “help”.
  • Merged too quickly and cancelled the live update. Two changes merged close together meant the newer one never went live. Fixed this issue by giving each change its own deploy queue.
  • Stale Dev Server. After the challenge file format changed, the development server needed a restart to pick it back up. I thought my browser was causing issues since I was able to see the questions before but nothing was displaying after that update. Turns out a restart fixed it.

Final thoughts:

A LOT of trial and error in this project. I am happy with how it works and plays now. It feels really polished and that if I sent it to a friend, they would be blown away. The Game idea really got me thinking - this idea could be further developed and turned into a real game if I put enough time into it. Like a rogue-like on the Steam store for IT users to practice. The lives idea and streak is what really gave me that thought. I could add power ups, mix up the questions, add different paths for your character to go down that would change the categories. This may be too niche for the typical Steam user but I could add in some BASIC A+ questions like “find the CPU” in a list of pictures which I always thought was a funny question on tests. Could use some brainstorming but it’s a decent idea.

shell

ls list cd learn go into cd .. go back open python visit help all commands Tab finish a name