Type 'ls' wrong on Linux. Watch what happens

|Kevin Villarreal

๐Ÿš‚ Type 'ls' wrong on Linux and a steam locomotive drives across your screen.

No, really....

Meet sl, one of the greatest typo punishments ever written.


๐—ง๐—ต๐—ฒ ๐˜€๐˜๐—ผ๐—ฟ๐˜† ๐—ฏ๐—ฒ๐—ต๐—ถ๐—ป๐—ฑ ๐—ถ๐˜
Back in the early 1990s, a Japanese programmer named Toyoda Masashi got tired of mistyping ls (the command to list files) as sl and getting a boring "command not found" error.

So he did what any reasonable developer would do: he wrote a program that punishes you for the mistake in the most delightful way possible.

Type sl by accident? A full ASCII steam locomotive comes chugging across your terminal and you can't skip it. You just have to sit there and watch it. That's the whole point.

It went viral in Unix circles, got packaged into Linux repos worldwide, and has been trolling sysadmins ever since.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๐—œ๐—ป๐˜€๐˜๐—ฎ๐—น๐—น๐—ถ๐—ป๐—ด ๐—ถ๐˜

Open the terminal and type the linux command based on your favorite Linux destribution:

โ€ข Debian / Ubuntuย โ†’ย sudo apt install sl
โ€ข Fedora / RHELย ย โ†’ย sudo dnf install sl
โ€ข Arch Linuxย ย ย ย โ†’ย sudo pacman -S sl


๐—™๐—น๐—ฎ๐—ด๐˜€ ๐˜„๐—ผ๐—ฟ๐˜๐—ต ๐—ธ๐—ป๐—ผ๐˜„๐—ถ๐—ป๐—ด
Flags areย sometimes known as options or switches.
sl isn't just one train. It comes with options:

-aย โ†’ย Passengers appear in the windows screaming for help ๐Ÿ†˜
-lย โ†’ย A smaller, little locomotive ๐Ÿš‚
-Fย โ†’ย The train flies across the screen โœˆ๏ธ
-eย โ†’ย Lets you interrupt it with Ctrl+C (cheating, but valid) ๐Ÿ˜…

The -a flag is the fan favourite. Highly recommended.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

sl is a 30-year-old program with zero productivity value and it's still being maintained, still packaged, and still making people smile when they fat-finger a command.

That's the Linux spirit in a nutshell.

Install it on your homelab server. Your future self will appreciate the company during late-night SSH sessions. ๐Ÿš‚

Have you stumbled across sl before? Drop a ๐Ÿš‚ in the comments.

0 comments

Leave a comment