
Sl: a steam locomotive in your terminal - aaasen
http://aasen.in/blog/sl/
======
nuclear_eclipse
On the Sun/Solaris machines where I first worked, the `sl` command had an
added bonus: it played a really loud "choo-choo" sound from the workstation's
internal speaker, regardless of volume or mute settings, so you _always_ knew
when someone fat-fingered their file listings, and much laughing was had by
all.

I very quickly learned to alias sl=ls in my shell rc, and it's still in there
to this day, just in case...

------
Argorak
I highly recommend the debian bug tracker on `sl`:

<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614158>

Also, for those that love their cars "pre-tuned by german engineers", there is
`gti`:

<http://r-wos.org/hacks/gti>

~~~
_delirium
There are some nice closed bugs too. Here is an argument over whether it
should support ^C by default: <http://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=598992>

------
ggreer
Veteran: "You should apt-get install sl."

Newbie: "What does sl do?"

Veteran: (perfectly straight face) "It trains you."

~~~
jitl
Debian ships `alias sl="ls"` in the default .bashrc

~~~
martinced
Weird. My Debian systems don't have that alias...

------
gee_totes
I've always wondered: why is it a locomotive? Why not a penguin or something
else?

Just thinking aloud here: ls stands for 'list'.... so sl stands for 'tsil'....
which is a model of a train? No, that's not it.

I think there's a missing part to this joke.

[edit] Just stepped away from my desk and took two steps and figured it out:
sl = steam locomotive

~~~
pifflesnort
Regarding the penguin: sl(1) was originally written in 1992; Linux itself
didn't hit 1.0 until 1994, and the Linux penguin itself wasn't introduced
until 1996.

------
Oompa
I added this to Homebrew years ago, for those OS X users.

~~~
Ogre
I just installed it, thanks!

Also, brew seems to have added a beer mug emoji to the terminal output when it
finishes installing something since the last time I installed anything. I
didn't know the terminal (Actually iTerm 2 in this case) even supported that.
Neat!

------
Blahah
When a colleague accidentally types their password to our cluster into a chat
window, the first thing I do is login as them and alias ls=sl. Another fun one
is to add `telnet towel.blinkenlights.nl` to their .bashrc, so on login they
get to watch ascii star wars.

~~~
jaxb
... and if you unset telnet's escape char, they will watch it to the end.

~~~
nnnnni
That's hilariously evil

------
adimitrov
The one bad thing about switching to the Dvorak layout is that in Dvorak, ls
is really cumbersome to type. The l isn't on the home-row, and both of them
are on the right pinky. The way I do it now, it's virtually impossible to type
sl instead of ls.

Typing dc instead of cd, though is still very common. And dc just mockingly
tells me: "will not attempt to process directory."

(I now have `no` aliased to ls. Maybe I should alias `on` to sl.)

------
laumars

        > The following code changes the default behaviour of ls from listing
        > files to turning your terminal into an unstoppable steam locomotive.
        > The only way to end it is closing the terminal, so use this with caution.
    

erm, that's easily stopped:

    
    
        [ctrl]+z
        $ pkill -9 sl

~~~
tylermenezes
erm, no? "while true; sl; done"

~~~
X-Istence
Hold ctrl + c down, eventually sl will have quit, and bash will quit the while
loop. I've never had issues quitting out of

    
    
      while true; do echo "stuff"; done
    

for example.

------
rdtsc
Bonus info:

if you add arguments to sl like -l or -a you get a different locomotive or
other effects!

------
Mindless2112
Why alias commands to sl? The point is for it to be triggered on bad typing.

Also, the man page is worth a look --
<http://manpages.ubuntu.com/manpages/precise/man6/sl.6.html>

------
captn3m0
The moving train uses js for motion. I stripped that part to
<http://jsbin.com/ujizup/1>

------
orvtech
I did a little video on this a couple of weeks a go with a mini how to for
Fedora users <https://news.ycombinator.com/item?id=4766611>

------
frankblizzard
first saw this thing around 12 years ago on an AS/400 terminal. Our
neckbearded Lead Programmer was supposed to have programmed it in RPG but
probably this thing is even older?

~~~
Argorak
The source downloaded from the authors page[1] lists the following
modification times:

    
    
        [ skade sl ] ls -la *
        -rw-r--r-- 1 skade staff  331 Jul 22  1998 Makefile
        -rw-r--r-- 1 skade staff  417 Jul 22  1998 README
        -rw-r--r-- 1 skade staff  689 Jan 18  1994 sl.1
        -rw-r--r-- 1 skade staff 7.0K Jul 22  1998 sl.c
        -rw-r--r-- 1 skade staff 4.1K Jan 18  1994 sl.h
        -rw-r--r-- 1 skade staff  980 Jan 18  1994 sl.txt
    

So, it is almost 20 years old.

[1] <http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html>

------
benhalllondon
Great, excellent, fun.

But, clearly, it should run 'ls' after doing its choo choo?

~~~
minos
One could use a shell alias, a function or something similar for that.

~~~
ricket
alias sl='sl;ls'

------
niggler
"Note: I actually didn't use a marquee for this. The one good use for one, and
I missed it. Damn."

Is this even a good example for using html marquee?

------
prezjordan
How did you get this in the main repositories? I'm curious what the process is
for something like that.

~~~
blablabla123
According to someone else's comment this thing is at least 20 years old. AFAIK
these things go by popularity, after all any sort of game is also non-
productive...

------
davidroberts
I just installed it on my Raspberry Pi. It's in the Raspian repository too!

------
nilsbunger
If you're on a Mac with homebrew, "brew install sl" will get you there!

------
mbubb
Not the same thing but "apt-get moo" on a Debian based box is fun...

------
dogface
Oh come on! This isn't news. I was using sl fifteen years ago.

------
mostly_harmless
alternatively if you are really evil, you can 'alias ls="rm -rf"'

------
jzoidberg
We need one for "got"

~~~
kmf
Delivered.

<https://github.com/imkmf/got>

~~~
Watabou
Okay that is freaking awesome. I now have GoT's theme playing in the terminal.

This may actually make me misspell git even more.

------
systematical
had to apt-get sl

------
barkingcat
on os x - brew install sl brings it in.

