Linux / UNIX Desktop Fun: Steam Locomotive – get train in shell

Started by Administrator, Jan 09, 2023, 08:52 AM

Previous topic - Next topic

Administrator

One of the most common mistake is typing sl instead of ls command. I actually set an alias i.e. alias sl=ls; but then you may miss out the steam train with whistle.

sl is a joke software or classic UNIX game. It is a steam locomotive runs across your screen if you type "sl" (Steam Locomotive) instead of "ls" by mistake. sl is a highly advanced animation program for curing your bad habit of mistyping. In other words, you see Steam locomotive in ASCII art.

Install sl software to get Steam Locomotive ( train in shell )
Type the following apt-get command/apt command on a Debian / Ubuntu Linux:
$ sudo apt-get install slRun the following yum command on a CentOS/RHEL (first enable EPEL repo on a RHEL/CentOS version 6 or version 7 of CentOS/RHEL or enable and install ELEP repo on RHEL 8 or install EPEL repo on CentOS 8):
$ sudo yum install slType the following dnf command on a Fedora Linux:

$ sudo dnf install slExecute the following brew command on a macOS Unix desktop (see how to install Homebrew on macOS):
brew install sl

Run the following pkg_add command on a OpenBSD:
pkg_add -v sl

FreeBSD user type the following pkg command:
pkg install sl

Arch Linux user try the pacman command
sudo pacman -S sl

OpenSUSE or SUSE Linux user try installing sl using the zypper command:
sudo zypper in sl
Usage
kay, just mistyped ls command as sl:
sl

It also supports the following options:
-a : An accident seems to happen. You'll feel pity for people who cry for help.
-l : shows little one.
-F : It flies.
-e : Allow interrupt by Ctrl+C.
For extra fun try the following little bash for loop along with lolcat command:

Quote## tested on macOS only ##
for i in a l f o
do
 sl -${i} | lolcat
done