Running a Train in the Linux Terminal to Amuse Your Friends and Family

Choo choo! All aboard the choo choo train in the Linux terminal.
Warp Terminal

You can do a lot of serious work in the terminal. That’s not a secret.

But did you know that you can also do a lot of fun stuff in the Linux terminal? Like running a train in it?

Running train in Linux terminal

Run train in Linux terminal

There is no magic here. It’s just a tiny command line tool called ‘sl’.

I presume that it was developed entirely to have some fun when command ls is wrongly typed. If you have ever worked in Linux terminal, you know that ls is one of the most commonly used commands and perhaps one of the most frequently mistyped commands as well.

sl is a popular command and you should be able to install it in most Linux distributions using the package manager.

On Debian and Ubuntu based distributions, use the following command:

sudo apt install sl

To run the terminal train, just type sl in the terminal. You’ll see a steam train going from the right to the left side. It automatically stops as soon as the train “crosses the terminal”.

slcommand 3
Default sl command

Using the following options, you may have more fun with the train in the terminal.

  • -a: Accident mode. You can see people crying for help. Not for the faint-hearted ;)
  • -l: shows a more miniature train but with more coaches.
  • -F: A flying train like the Polar Express.
  • -e: Allows interrupt by Ctrl+C. In other modes, you cannot use Ctrl+C to stop the train. But then, it doesn’t run for long unless you have super ultra-wide monitor.
The program was written to sound a whistle, but it doesn’t work in most Linux distributions.

More options in the recent versions

There is a newer version of sl command available in Arch Linux that provides more options and tweaks:

sudo pacman -S sl
Latest sl -G Command

Additional Options:

  • -d: Disco Mode. Alternate colors during the animation.
  • -G: New look, similar to advanced trains. The French TGV can be seen in the screenshot above.
  • -w: The Train moves faster.
  • -[Number]: Through this option, the number of cars can be adjusted

In addition, if lolcat is installed, all these options can be piped to get rainbow effects.

sl -G command piped to lolcat for extra colors
sl -G command piped to lolcat for extra colors

Enjoy riding the Linux train :P

Want more fun with the terminal?

That was fun, right? You want more fun stuff in the Linux terminal? How about playing games in it?

Top 10 Command Line Games For Linux
Brief: This article lists the best command line games for Linux. Linux has never been the preferred operating system for gaming. Though gaming on Linux has improved a lot lately. You can download Linux games from a number of resources. There are dedicated Linux distributions for gaming. Ye…

You can also display your distro's logo in ASCII.

Display Linux Distribution Logo in ASCII Art in Terminal
See the picture above? You might have seen people sharing such desktop screenshot with terminal showing the logo of the Linux distribution used in ASCII art. Looking at those screenshots, you may wonder how to show the logo of Linux distribution in ASCII art in the terminal. In this tutorial,

Like me, if you enjoy retro tech and vintage colors, relive the nostalgia with the Cool Retro Terminal and go back to the 80s.

Get a Vintage Linux Terminal with Cool Retro Terminal
Nostalgic about the past? Get a slice of the past by installing retro terminal app cool-retro-term which, as the name suggests, is both cool and retro at the same. Do you remember the time when there were CRT monitors everywhere and the terminal screen used to flicker? You don’t

🗣️ Know more amusing Linux stuff like this? Share it with me in the comment section.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world


Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.