Mistyped ‘ls’ command as ‘sl’ – Cure your bad habit of mistyping!

Mistyping a command is common; for example, typing ‘sl‘ instead of ‘ls‘ is very common. But this mistyping resulted in a funny output on my colleague’s terminal and what I heard from him was a train running on the terminal. Seriously, he asked me to try out the command on my terminal, and what I saw was “command not found”. A quick googling revealed an interesting fact of command ‘sl’.

Well, there are a couple of ways to get rid of this bad habit of mistyping. One way is to create an alias; for example, alias sl=ls in your ~/.bashrc. Another way is to type ‘sl‘ and have fun.  Yes, how about calling ‘sl’ as ‘steam locomotive’ and run an animated train on the terminal?

Install ‘sl’ command

On Debian/Ubuntu:

$ sudo apt-get install sl


$ sudo yum install sl

Do you see ‘Nothing to do’ as an output of the yum command.

$ sudo yum install sl
No package sl available.
Error: Nothing to do

Then you should enable EPEL repo as shown below:

$ sudo yum -y install epel-release
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
epel-release.noarch 0:7-11

Refresh the repo using the below command:

$ sudo yum repolist

Now install ‘sl’

$ sudo yum install sl

Running transaction
Installing : sl-5.02-1.el7.x86_64 1/1
Verifying : sl-5.02-1.el7.x86_64 1/1

sl.x86_64 0:5.02-1.el7


On macOS:

# pkg_add -v sl

On FreeBSD:

# pkg install sl

That’s it!

sl command

Now go on and type the command ‘sl‘ to see a train running in the terminal. The github page of the project says it’s a joke command to cure the bad habit of mistyping.

sl command

Updated on October 6, 2021

Was this article helpful?

Related Articles

Leave a Comment