Linux Candy

Linux Candy: Steam Locomotive – fun command for your terminal

Last Updated on May 25, 2022

Who loves eye candy? Don’t be shy — you can raise both hands!!

Linux Candy is a series of articles covering interesting eye candy software. We only feature open-source software in this series.

Steam Locomotive is a tiny C program, written in 295 lines of code. It’s just a harmless bit of fun.

Installation

Compiling is trivial. You can compile sl by cloning the project repository, and issuing the make command. But you might find a convenient package in your distribution. Either way, installation takes 10 seconds.

In Operation

ls is a command to list computer files in Unix and Unix-like operating systems. When invoked without any arguments, ls lists the files in the current working directory.

If you mistakenly type sl instead of ls, you’ll see the following animation in your terminal.

Like all good command-line utilities, ls has a range of command options. Only a few of these options are replicated with sl.

You might be aware that ls -a lists all entries in the directory, including the entries with start with a . (dot). Typing sl -a produces the following animation. Witness the accident at hand with people crying for help. I guess it’s a good choice for -a.

Any self-respecting Linux user will know that the -l flag displays the mode, number of links, owner, group, size (in bytes), and time of last modification for each file. With sl, the -l flag slightly bizarrely shows a little version of the steam locomotive. It’s a bit of a strange choice considering you get more information with the -l flag with ls.

ls -F is a much less common option, putting a / after each file name if the file name is a directory, an * if the file can be executed, an = if the file is a socket, a | if the file is a FIFO, and a @ for a symbolic link. If you mistype ls with the -F flag, you’ll see your loco literally flying away.

Summary

The developer describes Steam Locomotive as a highly advanced animation program for curing your bad habit of mistyping.

In reality, the animation is basic, and it probably won’t cure you of typing errors. But it’s a bit of harmless fun nevertheless.

Website: github.com/mtoyoda/sl
Support: Fork
Developer: Toyoda Masashi and contributors
License: Open Source

Steaam Locomotive is written in C. Learn C with our recommended free books and free tutorials.

Complete list of articles in this series:

Linux Candy
ASCIIQuariumEmbrace marine life from the terminal with beautiful ASCII art
ASCII Art ConverterA small utility that converts images into ASCII art
BobRossQuotesCollection of quotes from Bob Ross
BoxesCommand line ASCII boxes
BuohOnline strips comics reader
cacafireColor ASCII fire
catclockxclock with an enhanced cat mode
cbonsaiGenerate bonsai trees in the terminal
christmasfetchFestive cheer on the desktop
chucknorrisChuck Norris jokes in your terminal
cornyjokesCorny jokes for the terminal
CMatrixncurses program that simulates the display from “The Matrix”
ctreeA Christmas tree right on your terminal
eDEX-UISci-fi computer terminal emulator and system monitor
emojSimple tool that to find suitable emojis for pasting to your clipboard
EmoteModern popup emoji picker
EvolvotronInteractive generative art
FantasceneDynamic wallpaper changer
FondoFind beautiful wallpapers from Unsplash
gtiTypo-based curio inspired by Steam Locomotive
HollywoodFill your console with Hollywood melodrama technobabble
linuxwaveGenerate music from the entropy of Linux
lolcatRainbows and unicorns
No More SecretsRecreates the data decryption effect from the Sneakers movie
nookPlays Animal Crossing hourly themes on the hour
nyancatTerminal-based Pop Tart Cat Animation
onekoAnimal chasing fun
pipes.shAnimated pipes terminal screensaver
ponysaycowsay reimplemention for ponies
projectMMusic visualizer originally based on Milkdrop
pscircleA different take on the venerable ps command
PyBonsaiGenerates procedural ASCII art trees
pyjokesOne line jokes for programmers
PywalGenerate color schemes on the fly
RelaxatorRelax to soothing sounds
Rusty AquariumMonitoring by visualization
Steam LocomotiveC program written in 295 lines. It's harmless fun
TernimalAnimated lifeform in the terminal
terminal-parrotParty parrot time
tetrisTile-matching puzzle video game in your terminal
VarietyWallpaper manager with many desktops and wallpaper sources
WallGenGenerate HQ poly wallpapers with a few arguments.
WallpaperDownloaderDownload, change, and manage wallpapers
xcowsayDisplays a cow on your desktop with message
XDecorationsAdd some festive cheer to your desktop
XScreenSaverFramework and collection of screensavers
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our FAQ before making a comment.

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Trent Calder
Trent Calder
4 years ago

My 9 year old is fascinated by steam locomotives. And with COVID-19, social distancing, and a big glob of boredom, Steam Locomotive offers a tiny ray of sunshine for my boy. And I even think I’ll buy him a small Linux computer for him to start his own adventures. Any recommendation? Something a bit more powerful than the Raspberry Pi 4 preferably.

S S
S S
4 years ago

That’s loco,hahaha.