Will you join me on a short train journey? I’d love to have company, and I’m sure we’ll have an enjoyable time together.
The weekend has arrived, so I’m going out to enjoy some fresh air and would love for you to join me when I hear Jake’s voice saying, “Hey dude, wake up!” “It’s Monday, 9:00 a.m., and you’re already late.”
Oh boy, I must have been dreaming about spending the weekend with you! But no worries; we will make our short journey using the
sl command, where we will learn about the sl command and its interesting features and have some fun along the way.
I’m already at the terminal, waiting to see what the
sl command can do for us.
What is SL Command?
sl stands for “Steam Locomotive.” It is a simple command that replaces a mistyped “
ls“ command error with a train passing by your terminal as a reminder to be careful when typing commands in the future.
And it has been around for quite some time and has become increasingly popular in the past few years, with many people using it for fun and to be more cautious when typing commands.
So let’s see how this command works, what features it has, and how you can use it, but before that, you need to install it on your system.
Install SL Command on Linux
It’s an old tool included in most Linux distributions, so getting it is as simple as opening a terminal window and running the appropriate command as per the instructions for your particular distribution.
For Debian-based distributions (such as Ubuntu and Linux Mint), you can use the below command:
$ sudo apt install sl
RHEL based distributions (such as Fedora and CentOS) can download and install sl command using the below command:
$ sudo dnf install sl
For those of you using Arch Linux, please enter this command:
$ sudo pacman -S sl
OpenSUSE or SUSE base users can try to run the following command:
$ sudo zypper in sl
Homebrew use can also install
sl command by running the below code:
$ brew install sl
Once the installation is over, let’s move on to the next section, where you will see some common options for running trains on your terminal window.
Run SL command on Terminal
sl command does not have any practical use, but it can be used for fun or entertainment and to start the train simulation you can use the following command to make the train smoke
That was the basic method by which trains moved from one end to the other.
Let’s spice things up by changing locomotive to French Oscar and adding some options to the
sl command, which is mostly available in Arch Linux.
$ sl -G
If you want to add an extra carriage to the engine, then use the following command:
$ sl -5
Don’t you think train colours are monotone? Let’s make train colours change during animation using the -d parameter with 4 extra carriages.
$ sl -d5
If you have lolcat installed on your computer, then you can make the engine more attractive by piping the output like shown below:
$ sl | lolcat
The output of the above command:
Instead of running train to track you can fly it by using -F options, and to run train faster you can use -w
$ sl -F $ sl -w
If you ask about my personal preference for using
sl, then I’ll like to combine it with the -lFGw option, which I like more than the other options.
$ sl -lFGw
The output of the above commands:
Keep in mind that the
sl command is just a fun tool and does not have any real-world applications. It’s just a command-line toy to have some fun with and to entertain, and it can be used to make the terminal more interesting and entertaining.
You can check out five funny Linux commands, which you can run on your terminal.
A man with a tech effusive who has explored some of the amazing technology stuff and is exploring more. While moving towards, I had a chance to work on Android development, Linux, AWS, and DevOps with several open-source tools.