Learn Linux by Playing Games: Bandit, GameShell and More
Free games that teach the Linux command line step by step: OverTheWire Bandit, GameShell, Terminus, Command Challenge and vimtutor, and where to play them.
3 min readBy Smita
Reviewed by the AmazingRDP technical team

After the games comes a real machine. A Linux VPS is a server of your own to practise on. See Linux VPS from $6.99
The Linux command line is learned by typing, not by reading. Games make the typing worth doing: each level asks for one small thing, you work out the command, and the next level builds on it. These are free, and good.
The games
| Game | Teaches | Where it runs | Level |
|---|---|---|---|
| Terminus | Moving around, basic file commands | In a web browser | Absolute beginner |
| GameShell | Files, folders, pipes, permissions, processes | In your own terminal | Beginner |
| OverTheWire: Bandit | The real command line, SSH, finding things, basic security | On a remote server over SSH | Beginner to intermediate |
| Command Challenge | One-line solutions with standard tools | In a web browser | Intermediate |
| vimtutor | The Vim text editor | In your own terminal | Beginner |
Terminus
A text adventure made at MIT that runs in the browser. You walk between locations with cd, look around with ls and read things with less. Half an hour, and the first commands stay in your fingers.
GameShell
An adventure that runs inside a real shell, so everything you type is the real thing. On a Linux machine:
wget https://github.com/phyver/GameShell/releases/download/latest/gameshell.sh
bash gameshell.sh
It has dozens of missions, from moving through folders to pipes and process control, and can be stopped and continued.
OverTheWire: Bandit
The classic. You sign in to a server over SSH, and each level hides the password for the next one. Finding it takes a new command or idea every time. Level 0 starts with a public login, given on the game's site:
ssh bandit0@bandit.labs.overthewire.org -p 2220
The password for level 0 is bandit0. From there you are on your own, with the hints on overthewire.org. Bandit teaches the things courses skip: reading manual pages, odd file names, searching, encodings, and how permissions really behave.
Command Challenge
Short tasks in the browser (cmdchallenge.com): "print the last five lines of this file", "count the unique lines". Each is solved with one line, and you can compare your answer with other people's afterwards, which is where most of the learning happens.
vimtutor
vimtutor
Not a game by name, and it works like one: a text file that teaches Vim by making you edit the file itself. It takes about thirty minutes and is installed almost everywhere. Sooner or later every server administrator lands in Vim and needs to get out again.
A sensible order
- Terminus, to lose the fear.
- GameShell, for the everyday commands.
- Bandit, levels 0 to 15, for depth.
- Command Challenge, to get quick.
- vimtutor, whenever you first need to edit a file on a server.
Where to play
- On Windows: install WSL and you have a Linux terminal in a minute. See how to enable WSL.
- On a phone: Termux runs GameShell and connects to Bandit. See terminal emulators for Android.
- In a virtual machine: see operating systems for a first virtual machine.
- On a server: any Linux machine with SSH will do.
After the games
Games teach commands. Running a machine teaches the rest: users, updates, a firewall, a web server, a backup. The step after Bandit is a small server of your own that you set up from nothing, break, and repair. Our Linux VPS plans are made for that. Good first exercises: add users to groups, open and block ports, and list the open ports.
The earlier version of this page claimed a study figure for how much games improve learning. We could not find the source and have removed it.
Questions
What is the best game to learn Linux commands?
OverTheWire Bandit for the real command line over SSH. GameShell and Terminus are easier starting points.
Is OverTheWire Bandit free?
Yes. You only need an SSH client.
Can I learn Linux without installing it?
Yes. Terminus and Command Challenge run in a web browser, and Bandit runs on a remote server.
How do I connect to Bandit level 0?
Run ssh bandit0@bandit.labs.overthewire.org -p 2220 and enter the password bandit0.