Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

XKCD Deploys Command Line Interface

CmdrTaco posted more than 4 years ago | from the it's-actually-better dept.

Unix 288

ipquickly was one of a large number of users to note that the best on-line comic has just got a little better with the addition of a command line interface. You can also sign the petition to make the CLI permanent.

cancel ×

288 comments

Sorry! There are no comments related to the filter you selected.

Hasn't everyone written a bogus shell at some time (0)

NixieBunny (859050) | more than 4 years ago | (#31703510)

It's a lot of fun.

Re:Hasn't everyone written a bogus shell at some t (1)

Penguinisto (415985) | more than 4 years ago | (#31703536)

This is cool as frig!

It's actually very responsive, you can use a surprising number of standard *nix commands, and, well, damn - awesome job.

Props to the XKCD guy (now why doesn't " sudo su - " work? :) )

Re:Hasn't everyone written a bogus shell at some t (2, Informative)

mjschultz (819188) | more than 4 years ago | (#31703588)

I spent way too much time after I tried the most natural command line program `look`. Yeah, there is a tiny game in there too. Also, you still don't want to `sudo rm -rf /` cause then you'll have to restart the page.

Re:Hasn't everyone written a bogus shell at some t (4, Informative)

mikael_j (106439) | more than 4 years ago | (#31703664)

"sudo su -" doesn't work but "sudo make me a sandwich" does.

Re:Hasn't everyone written a bogus shell at some t (1)

PIBM (588930) | more than 4 years ago | (#31703574)

Started out with

sudo reboot

oops :)

Re:Hasn't everyone written a bogus shell at some t (1)

Technician (215283) | more than 4 years ago | (#31703652)

I actually saw more of their site by the command line than I normaly do. I normaly read the comics. On the command line I explored and found they are building a school in Laos. Wow, I never knew that before. It is amazing what can be found from the command line. I like it.

It was harder to read the comics from it though. I'll have to keep looking to find the archive.

Re:Hasn't everyone written a bogus shell at some t (1, Informative)

Anonymous Coward | more than 4 years ago | (#31703828)

One of the most elaborate ones I found is: http://www.masswerk.at/jsuix/

Dear Slashdot, (5, Interesting)

Jurily (900488) | more than 4 years ago | (#31703514)

that was funny. Learn from him.

Re:Dear Slashdot, (2, Funny)

Anonymous Coward | more than 4 years ago | (#31703580)

up up down down left right left right b a

do it a bunch of times

Re:Dear Slashdot, (5, Interesting)

Jurily (900488) | more than 4 years ago | (#31703648)

Flamewar time!

guest@xkcd:/$ vi

You should really use emacs.

guest@xkcd:/$ emacs

You should really use vim.

guest@xkcd:/$ ed

You are not a diety.

guest@xkcd:/$ nano

You should really use an editor.

Re:Dear Slashdot, (4, Interesting)

zx-15 (926808) | more than 4 years ago | (#31703840)

Even better:
  guest@xkcd:/$ whoami
  You are Richard Stallman.
Also, a rather weird command execution:

guest@xkcd:/$ kill

Terminator deployed to 1984

But,

guest@xkcd:/$ kill 1

Unrecognized command. Type "help" for assistance.

Command parser definitely needs some work

guest@xkcd:/$ sudo -i

sudo: -i: command not found

Also I demand, while, for, if and which.

Re:Dear Slashdot, (3, Interesting)

plasticsquirrel (637166) | more than 4 years ago | (#31703670)

Right, the last time Slashdot changed, it was just for a "new" layout. And the new layout just looked like the old layout, but with crawling JavaScript. The butt ugly pine-green-on-white was never even questioned. To get some volunteer graphic designers together for a new conceptual look would have made too much sense.

Also, Arial? WTF, Slashdot? At least pick Verdana or Georgia in the stylesheets, two decent web fonts that ship with Windows. And why haven't we ever been able to post limited pre-formatted snippets of code? Not to mention some sort of glyph coverage beyond ASCII...?

In this day and age... (5, Insightful)

Dripdry (1062282) | more than 4 years ago | (#31703520)

It would feel delicious, to me, that right when the iPad comes out, designed for people to consume more ephemeral and pointless information than ever, that a site like this would make itself slightly more exclusive by moving backwards on the user interface timeline.

Bless your heart, xkcd!

Re:In this day and age... (5, Funny)

Drinking Bleach (975757) | more than 4 years ago | (#31703528)

I support web sites that force both hands to be doing something. At least it makes us look more productive.

Re:In this day and age... (1)

Dripdry (1062282) | more than 4 years ago | (#31703540)

I'm not sure that I have the proper authorization to comment on that... but I'll bet there are quite a few slashdotters who have many of those types of sites bookmarked!

Re:In this day and age... (0)

Anonymous Coward | more than 4 years ago | (#31703682)

wait, what would your other hand be doing?

Re:In this day and age... (5, Funny)

garvon (32299) | more than 4 years ago | (#31703738)

I work in the internet porn industry and we go for sites that can be surfed one handed.

Yeeeah (0, Redundant)

FlyByPC (841016) | more than 4 years ago | (#31703522)

Yet another example of why xkcd == cool.

No tab completion! (5, Insightful)

Anonymous Coward | more than 4 years ago | (#31703526)

What is a shell without tab complete?!? Even Windows supports it.

Re:No tab completion! (1)

Tubal-Cain (1289912) | more than 4 years ago | (#31703530)

That bugged me as well.

Re:No tab completion! (2, Interesting)

dgatwood (11270) | more than 4 years ago | (#31703566)

That's okay. They made up for it by occasionally disabling your backspace key, though it would have been better if they had inserted ^H, too. Or maybe that was just a random glitch.

Re:No tab completion! (1)

Jurily (900488) | more than 4 years ago | (#31703704)

Most of the fun comes from guessing the available commands.

Re:No tab completion! (1)

GNUALMAFUERTE (697061) | more than 4 years ago | (#31703818)

Most of the fun comes finding the available commands in the source code.

There, FTFY

Re:No tab completion! (3, Informative)

QRDeNameland (873957) | more than 4 years ago | (#31703572)

What is a shell without tab complete?!? Even Windows supports it.

However, I was impressed that it implemented up-down arrow command history, and even "ls".

I tried "rm -rf /" but permission was denied. :-)

Re:No tab completion! (0)

Anonymous Coward | more than 4 years ago | (#31703594)

What is a shell without tab complete?!? Even Windows supports it.

However, I was impressed that it implemented up-down arrow command history, and even "ls".

I tried "rm -rf /" but permission was denied. :-)

try again with sudo ;)

Re:No tab completion! (1)

John Hasler (414242) | more than 4 years ago | (#31703680)

> I tried "rm -rf /" but permission was denied. :-)

Be glad it wasn't granted. Locally.

Re:No tab completion! (0)

Anonymous Coward | more than 4 years ago | (#31703814)

> I tried "rm -rf /" but permission was denied. :-)

Be glad it wasn't granted. Locally.

sudo rm -f /

Re:No tab completion! (1)

Jurily (900488) | more than 4 years ago | (#31703690)

I tried "rm -rf /" but permission was denied. :-)

I almost tried that... reflexively in Konsole.

Re:No tab completion! (1, Funny)

Anonymous Coward | more than 4 years ago | (#31703774)

Try sudo rm -rf /, then try any other command.

Elsewhere Public Works (1)

MrEricSir (398214) | more than 4 years ago | (#31703532)

XKCD's CLI a lot easier to use than the Elsewhere Public Works BBS:
http://elsewherepublicworks.com/ [elsewherepublicworks.com]

(Yes, it's part of an ARG. And yes, if you live anywhere near San Francisco you should be playing it already.)

Wait...this is a real story. (5, Funny)

Anonymous Coward | more than 4 years ago | (#31703534)

Slashdot has completely missed the point of April fools day. They posted a REAL story in amongst the entire useless days worth of fake ones.

Re:Wait...this is a real story. (1)

Dthief (1700318) | more than 4 years ago | (#31703726)

its April 2nd in some places already

uname (5, Informative)

Anonymous Showered (1443719) | more than 4 years ago | (#31703542)

guest@xkcd:/$ uname
Illudium Q-36 Explosive Space Modulator

and

guest@xkcd:/$ su
God mode activated. Remember, with great power comes great ... aw, screw it, go have fun.

I lol'ed.

Re:uname (1)

Rathkan (1732572) | more than 4 years ago | (#31703584)

guest@xkcd:/$ cat
You're a kitty!

Re:uname (1)

Rathkan (1732572) | more than 4 years ago | (#31703622)

guest@xkcd:/$ vi
You should really use emacs.

guest@xkcd:/$ emacs
You should really use vim.

guest@xkcd:/$ find
What do you want to find? Kitten would be nice.
guest@xkcd:/$ find kitten

{game about a robot finding a kitten, rogue-style}

hahaha

Re:uname (1)

MartinSchou (1360093) | more than 4 years ago | (#31703612)

guest@xkcd:/$ whoami
You are Richard Stallman.

guest@xkcd:/$ cat
You're a kitty!

guest@xkcd:/$ bash
You bash your head against the wall. It's not very effective.

Re:uname (1)

QRDeNameland (873957) | more than 4 years ago | (#31703614)

Try:

guest@xkcd:/$ whoami

Re:uname (0)

Anonymous Coward | more than 4 years ago | (#31703618)

sudo shutdown now

Re:uname (0)

Anonymous Coward | more than 4 years ago | (#31703640)

guest@xkcd:/$ pwd

You are in a maze of twisty passages, all alike.

Other fun things to do (5, Informative)

Virak (897071) | more than 4 years ago | (#31703674)

  • Typing cat with an argument, naturally dumps that file to stdout. Typing cat without an argument does something entirely different.
  • On a semi-related note, typing "find kitten" lets you find kitten.
  • rm -rf / doesn't work because, like on any good *nix system, you're not normally running as root.
  • But you can use sudo with this (and several other things) to do it anyway.
  • apt-get upgrade (don't forget the sudo) will gladly suggest an upgrade to you if you're using Internet Explorer.
  • Both vim and emacs are available, in a manner.
  • man doesn't provide help for most commands, but it does provide some amusing responses for some of them.
  • Try typing "look".
  • Various commands don't really do anything, but provide amusing responses. Try ping, ssh, ed, kill, or asl.
  • There's a command for people who read the source code (along with, you know, the names of all the other commands), but you should find that on your own.
  • And many, many more!

Re:Other fun things to do (5, Informative)

TubeSteak (669689) | more than 4 years ago | (#31703778)

Everything is containted in this javascript:
http://www.xkcd.com/unixkcd/xkcd_cli_all.js [xkcd.com]

You can root around to figure out some of the more obscure commands.

Re:Other fun things to do (0)

Anonymous Coward | more than 4 years ago | (#31703792)

Also, building on the Look, you can "go west" or "go south" etc.

Re:uname (0)

Anonymous Coward | more than 4 years ago | (#31703678)

guest@xkcd:/$ pwd
You are in a maze of twisty passages, all alike.

guest@xkcd:/$ echo
Echo ... echo ... echo ...

Re:uname (1)

mycroft822 (822167) | more than 4 years ago | (#31703692)

guest@xkcd:/$ fuck
I have a headache.

Re:uname (1)

liamoshan (1283930) | more than 4 years ago | (#31703758)

guest@xkcd:/$ finger

Mmmmmm...

Re:uname (0)

Anonymous Coward | more than 4 years ago | (#31703768)

guest@xkcd:/$ finger

Mmmmmm...

Using wget seems to be supposed to do something, but at least I couldn't get it to do anything useful.

Re:uname (0)

Anonymous Coward | more than 4 years ago | (#31703796)

try ping
sudo rm -rf /

sudo (5, Funny)

ZX3 Junglist (643835) | more than 4 years ago | (#31703544)

sudo make me a sandwich
Okay.
http://xkcd.com/149/ [xkcd.com]

Lesbian Orgy (0)

Anonymous Coward | more than 4 years ago | (#31703546)

Mouse over today's image and read the information text.

Oblig. Sandwich. (5, Funny)

Anonymous Showered (1443719) | more than 4 years ago | (#31703550)

guest@xkcd:/$ make me a sandwich
What? Make it yourself.
guest@xkcd:/$ sudo make me a sandwich
Okay.
guest@xkcd:/$

"best" (1, Funny)

spazdor (902907) | more than 4 years ago | (#31703554)

xkcd!?? But you just said "the best webcom-..

OH I GET IT APRIL FOOLS

Potty brain... (1)

stefanlasiewski (63134) | more than 4 years ago | (#31703556)

Yes, sometimes I'm immature. But it's fun to find Easter eggs like this:

guest@xkcd:/$ go left
You cannot go left.
guest@xkcd:/$ go right
You cannot go right.
guest@xkcd:/$ go forward
You cannot go forward.

guest@xkcd:/$ kill

Terminator deployed to 1984

guest@xkcd:/$ fuck
I have a headache.
guest@xkcd:/$ help fuck
That would be cheating!

Re:Potty brain... (4, Funny)

ShadowRangerRIT (1301549) | more than 4 years ago | (#31703676)

You missed:

guest@xkcd:/$ go up
You cannot go up.
guest@xkcd:/$ go down
On our first date?

Re:Potty brain... (0)

Anonymous Coward | more than 4 years ago | (#31703688)

go down :)

Re:Potty brain... (1)

thetoadwarrior (1268702) | more than 4 years ago | (#31703824)

try go down

Whatever you do don't "go south" (2, Interesting)

pcx (72024) | more than 4 years ago | (#31703562)

The new format is a bit more adventurous than it looks at first blush.

Re:Whatever you do don't "go south" (0)

Anonymous Coward | more than 4 years ago | (#31703598)

look
light lamp
then you can go south without being eaten by a grue =)

Re:Whatever you do don't "go south" (0)

Anonymous Coward | more than 4 years ago | (#31703716)

Try "light lamp" before "go south".

Re:Whatever you do don't "go south" (0)

Anonymous Coward | more than 4 years ago | (#31703748)

the guru doesn't eat you if you "light lamp" before you "go south"

I get "Sorry, the CLI requires JavaScript to work" (1)

John Hasler (414242) | more than 4 years ago | (#31703570)

I assumed initially that that was the joke. I guess a blank, unreponsive screen is funnier, though (but the prompt should be a single ".").

Re:I get "Sorry, the CLI requires JavaScript to wo (1)

John Hasler (414242) | more than 4 years ago | (#31703608)

Now I see that it requires googleapis.com. ROFL.

try these commands.... (1, Informative)

Anonymous Coward | more than 4 years ago | (#31703576)

make me a sandwich
sudo make me a sandwich

write (1)

Tubal-Cain (1289912) | more than 4 years ago | (#31703590)

It supports the write command. An IRC chat screen opens.

Re:write (1)

Anonymous Showered (1443719) | more than 4 years ago | (#31703610)

# irc

also works!

Shutdown? (3, Interesting)

CapOblivious2010 (1731402) | more than 4 years ago | (#31703596)

Try "sudo shutdown"

Re:Shutdown? (1)

Anonymous Showered (1443719) | more than 4 years ago | (#31703602)

Awesome.

Text adventure! (sorta) (1)

aafiske (243836) | more than 4 years ago | (#31703606)

Try looking around. Then try going west, young man.

Check the source (1)

penguinchris (1020961) | more than 4 years ago | (#31703616)

The source code is available if you want to spoil all the jokes. There's a link on the bottom.

Re:Check the source (1)

digital_proletariat (1766902) | more than 4 years ago | (#31703800)

Relevant code here [github.com]

retro (0, Redundant)

TheSHAD0W (258774) | more than 4 years ago | (#31703620)

Yeah, it's neat and old fashioned... But requires Javascript to run.

Re:retro (1)

John Hasler (414242) | more than 4 years ago | (#31703642)

> But requires Javascript to run.

And googleapis.com. Pitiful, really.

Re:retro (4, Funny)

ElectricTurtle (1171201) | more than 4 years ago | (#31703786)

Yeah, because all of this could be done with plain HTML, obviously. Of course it's scripted. What do people expect?

Cool (0)

Anonymous Coward | more than 4 years ago | (#31703624)

Best interface design I think the web has offered. Not sure I like it hot typing cd store removes the command line completely.

Fun stuff (1)

jtorkbob (885054) | more than 4 years ago | (#31703626)

$ whoami

$ wget http://www.google.com/ [google.com]

$ sudo rm -rf /

$ vim
$ emacs
$ nano

Now I will cheat and read the source code.

rofl (0)

Anonymous Coward | more than 4 years ago | (#31703630)

guest@xkcd:/$ vi
You should really use emacs.
guest@xkcd:/$ emacs
You should really use vim.
guest@xkcd:/$ nano
You should really use an editor.
guest@xkcd:/$

shell commands (0, Redundant)

Jeremy Erwin (2054) | more than 4 years ago | (#31703644)


guest@xkcd:/$ whoami
You are Richard Stallman.
guest@xkcd:/$ emacs
You should really use vim.
guest@xkcd:/$ vim
You should really use emacs.
guest@xkcd:/$ nano
You should really use an editor.

guest@xkcd:/$ sudo shutdown

The System is going down for maintenance NOW!

and it does.

Interestingly, tex is not installed.

find.... (0)

Anonymous Coward | more than 4 years ago | (#31703646)

guest@xkcd:/$ find

What do you want to find? Kitten would be nice.

guest@xkcd:/$ find kitten

more commands (0)

Anonymous Coward | more than 4 years ago | (#31703654)

more funny: emacs, vim, echo, man

shutdown (0)

Anonymous Coward | more than 4 years ago | (#31703656)

guest@xkcd:/$ sudo shutdown

Whoops... sorry guys!

Nerdiness (1)

Alcoholist (160427) | more than 4 years ago | (#31703660)

Awesome nerdiness. PgUp and PgDn work too. Now all it needs is a searching function:

grep Megan xkcd | more

Because we all know how much of a babe she is, even if she could stand to gain a few pounds.

Infinite lives (1)

Dachannien (617929) | more than 4 years ago | (#31703662)

Konami code FTW.

Still doesn't protect you from that grue, though.

man commands (1)

MattLaughs (891780) | more than 4 years ago | (#31703668)

guest@xkcd:/$ man last
Man, last night was AWESOME.
guest@xkcd:/$ man next
Request confirmed; you will be reincarnated as a man next.
guest@xkcd:/$ man woman
Oh, I'm sure you can figure it out.
guest@xkcd:/$ man help
Man, help me out here.

date (1)

arndawg (1468629) | more than 4 years ago | (#31703684)

guest@xkcd:/$ date March 32nd

Vi and emacs (1)

ezdude (885983) | more than 4 years ago | (#31703694)

>>Vi >>You really should use emacs >>emacs >>You really should use vim

Re:Vi and emacs (1)

spikeb (966663) | more than 4 years ago | (#31703766)

nano>> you should really use an editor ed >> you are not a diety

I read the source code. (2, Informative)

Joeseph64 (1538923) | more than 4 years ago | (#31703696)

And by reading the source code, [github.com] I found out that "I read the source code" yields a text heart.

Also, I cheated and read all the other commands [github.com] you can use. (They're near the bottom of that file.)

That was good. (0)

Anonymous Coward | more than 4 years ago | (#31703698)

This was pretty good. especially the commands no listed in help, so far I have:
su
sudo
finger
vi
emacs
vim
rm
cat
display
echo
bash
ssh
exit

Re:That was good. (1)

EventHorizon_pc (1306663) | more than 4 years ago | (#31703826)

Try entering "cheat"

Note to Neal Stephenson (1)

gmuslera (3436) | more than 4 years ago | (#31703710)

In the ending (at least of xkcd) still is the command line.

A shell that requires JavaScript?!? (1)

noidentity (188756) | more than 4 years ago | (#31703714)

Sorry, the CLI requires JavaScript to work. Please turn on JavaScript, or try the GUI Interface.

In my day, command shells didn't require JavaScript just to work. And we had to type both sides of the exchange, uphill both ways, and in the snow.

Re:A shell that requires JavaScript?!? (1)

John Hasler (414242) | more than 4 years ago | (#31703740)

> And we had to type both sides of the exchange, uphill both ways, and in the
> snow.

Lazy sods. We had to mail in decks of punch cards.

Re:A shell that requires JavaScript?!? (0)

Anonymous Coward | more than 4 years ago | (#31703810)

In my day, command shells didn't require JavaScript just to work.

Yea, but in those days I had to go all the way to your basement to check your new shell.

undocumented commands I've seen: (4, Informative)

pushing-robot (1037830) | more than 4 years ago | (#31703718)

(most taken from the xkcd forum thread)

of course, (sudo) make me a sandwich
uname
su
sudo shutdown
sudo reboot
logout
pwd
lpr
clear
rm -rf /
find kitten
buy stuff
echo
finger
goto
date
irc/wget/curl
wget/curl xkcd.com
ping
vi/vim/emacs/nano
apt-get (moo)
sudo apt-get (update/upgrade/dist-upgrade)
moo
hello (joshua)
man (help) (cat) (last) (next)
go (west) (east) (south) (north)
look
light (lamp)
xyzzy
whoami
i read the source code
asl
cheat
buy stuff

Re:undocumented commands I've seen: (1, Informative)

Anonymous Coward | more than 4 years ago | (#31703746)

There's also "go down".

Re:undocumented commands I've seen: (1)

pushing-robot (1037830) | more than 4 years ago | (#31703756)

and "reddit", though that's in the released source.

man cat (1)

techpain (1781154) | more than 4 years ago | (#31703776)

guest@xkcd:/$ man cat You are now riding a half-man half-cat.

Baah (0)

Anonymous Coward | more than 4 years ago | (#31703798)

I just lost interest. :\ I want to navigate by clicking a button. Not guessing how to navigate.

Cool (1)

GNUALMAFUERTE (697061) | more than 4 years ago | (#31703812)

guest@xkcd:/$ cheat
*** FREE SHIPPING ENABLED ***

Awesome. So fucking awesome.
guest@xkcd:/$ sudo rm -rf /
guest@xkcd:/$ ls
Unrecognized command. Type "help" for assistance.

I lol'ed (0, Redundant)

ewe2 (47163) | more than 4 years ago | (#31703830)

guest@xkcd:/$ look

You are at a computer using unixkcd.

Exits: west, south

guest@xkcd:/$ go west

Life is peaceful there.

Exits: east, west

guest@xkcd:/$ go west

In the open air.

Exits: east, west

guest@xkcd:/$ go west

Where the skies are blue.

Exits: east, west

guest@xkcd:/$ go west

This is what we're gonna do.

Exits: east, west
guest@xkcd:/$

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>