You are browsing as a guest. Sign up (or log in) to start making projects!

2h 58m 14s logged

Teach Terminal

A browser-based game that teaches Linux terminal commands through interactive lessons and missions.

Today

Today I built the fake filesystem and connected it to the terminal. The terminal now feels like a real Linux system.

The filesystem supports:

  • pwd - shows current directory
  • ls - lists files and folders with colors (blue for directories, green for executables, white for files)
  • ls -l - shows permissions, owner, group, and name
  • cd - navigate with ~, ., .., and absolute paths
  • mkdir - create folders
  • touch - create files

The prompt updates when navigating directories. It shows ~ for the home directory and the full path everywhere else.

I also added realistic bash error messages. Invalid flags, missing arguments, and wrong paths all show proper errors like a real terminal would.

The terminal now has 7 working commands with real filesystem behavior. Next step is building the lesson system that teaches these commands one by one.

Completed

  • index.html - Start menu with Start and Settings buttons
  • settings.html - Settings page with three themes (Ubuntu, Hacker, Kali)
  • login.html - Login page with username, machine name, and password validation
  • main.html - Interactive terminal interface
  • style.css - Main styling, animated gradients, glassmorphism UI, and theme colors
  • login.css - Login page styling with themed backgrounds
  • settings.js - Saves the selected theme using localStorage
  • theme.js - Loads the saved theme and applies it automatically
  • login.js - Form validation and redirect to terminal
  • filesystem.js - Fake Linux filesystem with files, folders, permissions, and navigation
  • terminal.js - Terminal input handling, prompt display, line management, colored output
  • commands.js - Command recognition (help, pwd, clear, ls, cd, mkdir, touch)

Goal

My goal is to create a realistic Linux terminal that teaches beginners how to use common commands through interactive lessons instead of just reading documentation.

Next Steps

  • Build the lesson system (lectures + practice missions)
  • Add more commands (cat, rm, cp, mv, chmod, chown)
  • Add command history (up/down arrow keys)
  • Add redirection (>, >>, <)
  • Improve mobile experience

Try It

Live Demo

1
614

Comments 1

@RedPanda

Wow! This project would really help people into using linux!