Linux is being used by programmers, developers, and system admins for a very long time. We use the terminal for almost everything, installing/uninstalling, changing directories, cut, copy and pasting, etc.
But Linux also has a lot of unknown commands that you may accidentally type as a misspelling to a commonly used command.
This article is about the sl command which you might type in place of the ls command. We will see how to run a locomotive train in the Linux terminal using a single command.
sl stands for Steam Locomotive. It is created by Toyoda Masashi. It was created to remind you when you mistype the ls command. ls command is used commonly to list the files and folders of the current directory. It shows an animated train passing through the terminal and you can’t exit the program by pressing Ctrl+C.
Installing sl command
The sl command is already in the official repositories so it is very easy to install even for beginners.
- Ubuntu/Debian –
sudo apt install sl
- CentOS/Fedora –
sudo dnf install sl
- Arch Linux-
sudo pacman -S sl
In this article, we are installing the sl command on Ubuntu 20.04 LTS.
Open a terminal by pressing Ctrl+Alt+T. Execute the following command to install sl command,
sudo apt install sl
Now, type sl and press enter.
After entering the command, A moving train will appear moving from left to right once, and it cannot be terminated by pressing Ctrl+C so you have to wait till it ends.
There are also some parameters that will show some extra animations. By using
-a parameter, You will see a train moving with people shouting for help.
-l parameter, You will see a smaller train as compared to without parameter.
By using -F parameter, You will see a flying train animation.
You can also use
-e parameter to close the animation in between by using Ctrl+C command.
sl (Steam Locomotive) command was created for fun. It is a simple command with easy installation so even beginners can try it. There are many other fun commands which we will discuss in the next article.