Save 10%Pay yearly on any plan. 6% half-yearly, 3% quarterly. Help centreWhatsAppTelegram TeamsOpen a ticket

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

Learning Linux by playing terminal games

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

GameTeachesWhere it runsLevel
TerminusMoving around, basic file commandsIn a web browserAbsolute beginner
GameShellFiles, folders, pipes, permissions, processesIn your own terminalBeginner
OverTheWire: BanditThe real command line, SSH, finding things, basic securityOn a remote server over SSHBeginner to intermediate
Command ChallengeOne-line solutions with standard toolsIn a web browserIntermediate
vimtutorThe Vim text editorIn your own terminalBeginner

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

  1. Terminus, to lose the fear.
  2. GameShell, for the everyday commands.
  3. Bandit, levels 0 to 15, for depth.
  4. Command Challenge, to get quick.
  5. vimtutor, whenever you first need to edit a file on a server.

Where to play

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.