Difference between revisions of "149: Sandwich"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Explanation: rearrange explanation, and give better explanation of title text)
m (the period/comma belongs *inside* the quotation mark)
(17 intermediate revisions by 13 users not shown)
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
On a {{w|UNIX}}-type computer system, users can be assigned all kinds of rights, for example rights to access to certain directories and files and rights to execute certain commands. The “sudo” command overrides these policies by executing the command typed behind it as if the user were an administrator (the Super User) of the system, who can access much more of the system than a normal user.
+
On a {{w|UNIX}} computer system, users can be assigned to all kinds of rights, for example rights to access to certain directories and files to execute certain commands. The ''{{w|sudo}}'' command (pronounced "soo doo," not pseudo, because it stands for "super user do") lets certain (authorized) users override these policies by executing the command (everything after the word "sudo" on the command line) as the root user. Root (sometimes called the superuser) has complete system powers, exempt from all access controls. One very common activity for UNIX administrators is to install or configure software using the UNIX ''{{w|Make (software)|make}}'' command, e.g. <code>% '''make install'''</code>.  Often this command requires administrative permissions in order to complete successfully, which in practice means the "<code>make ''this''</code>" command will fail unless it is typed as "<code>sudo make ''this''</code>" instead. Forgetting to start the command with "sudo" is a fairly common and frustrating mistake for people who administer UNIX systems or their personal {{w|Linux}} computer. They then need to repeat the command with "sudo," whereupon the computer responds obediently, and everything works smoothly.
  
[[Cueball]] is demanding a sandwich from a friend. Not being properly asked, the friend denies the request. Cueball then (ab)uses the sudo command on the friend, which then has no choice but to go and make the sandwich, because Cueball has all rights.
+
[[Cueball]] is demanding a sandwich from his friend. Not being properly asked, the friend denies the request. Cueball then (ab)uses the sudo command on the friend, who then has no choice but to go and make the sandwich, and now does so without complaint, because Cueball has all the rights. For anyone versed in installing system software with the <code>make</code> command, this exchange is intensely reminiscent of the analogous onscreen experience.
  
On a real UNIX machine, to prohibit abuse of the command, the user must be in the “sudoers” group, and the user first must type their password before the command will be executed (unless they have already typed their password in the same terminal window within the past few minutes).
+
{{w|Simon Says}} is a children's game in which a leader gives various commands that must be followed if and only if ([[1033: Formal Logic|iff]]) the leader prefixes the command with "Simon says." The title text compares the way the computer will run some commands if they are preceded with "sudo" to the way Simon Says players are supposed to follow orders if (and only if) they are preceded with "Simon says."
  
{{w|Simon Says}} is a children's game in which a leader gives various commands which must be followed if and only if ([[1033: Formal Logic|iff]]) the leader prefixes the command with “Simon says”. And though UNIX’s user rights management system, which one could refer to as proper user policy, is complex and powerful, people’s use of it often degenerates into merely prepending “sudo” to a failed command so that it will work. For example, sometimes a command to delete a file “rm -f /path/to/some-system-file” will fail because the user does not have enough permissions, but the user knows they really want to delete the file, so they simply repeat the command with “sudo”: “sudo rm -f /path/to/some-system-file”. The title text compares the way the computer will run some commands iff they are preceded with “sudo” to the way Simon Says players are supposed to follow orders iff they are preceded with “Simon says”.
+
Alternatively, the title text might merely be referring to the similarity between Cueball ordering his friend around with "sudo" to the Simon Says game leader ordering other players around. Wikipedia suggests that the "Simon" in the name of the game may be the powerful lord Simon de Montfort, or a corruption of Cicero, both of whom were influential politicians of their day.
 
 
Alternatively, the title text might merely be referring to the similarity between Cueball ordering his friend around with “sudo” to the Simon Says game leader ordering other players around. Wikipedia suggests the “Simon” in the name of the game may be the powerful lord Simon de Montfort, or a corruption of Cicero, both of whom were influential politicians of their day.
 
  
 
==Transcript==
 
==Transcript==
:[Cueball is sitting on a couch, talking to a friend.]
+
:[Cueball is sitting on a couch, talking to a Cueball-like friend.]
 
:Cueball: Make me a sandwich.
 
:Cueball: Make me a sandwich.
 
:Friend: What? Make it yourself.
 
:Friend: What? Make it yourself.
 
:Cueball: Sudo make me a sandwich.
 
:Cueball: Sudo make me a sandwich.
 
:Friend: Okay.
 
:Friend: Okay.
 +
 +
==Trivia==
 +
*This comic is available as a T-shirt in the [https://store.xkcd.com/products/sudo xkcd store].
 +
*This comic is available as a signed print in the [https://store.xkcd.com/products/signed-prints xkcd store].
  
 
{{comic discussion}}
 
{{comic discussion}}
 +
 
[[Category:Comics featuring Cueball]]
 
[[Category:Comics featuring Cueball]]
 +
[[Category:Multiple Cueballs]]
 
[[Category:Linux]]
 
[[Category:Linux]]
 +
[[Category:Food]]
 +
[[Category:Comics with xkcd store products]]

Revision as of 15:03, 10 June 2020

Sandwich
Proper User Policy apparently means Simon Says.
Title text: Proper User Policy apparently means Simon Says.

Explanation

On a UNIX computer system, users can be assigned to all kinds of rights, for example rights to access to certain directories and files to execute certain commands. The sudo command (pronounced "soo doo," not pseudo, because it stands for "super user do") lets certain (authorized) users override these policies by executing the command (everything after the word "sudo" on the command line) as the root user. Root (sometimes called the superuser) has complete system powers, exempt from all access controls. One very common activity for UNIX administrators is to install or configure software using the UNIX make command, e.g. % make install. Often this command requires administrative permissions in order to complete successfully, which in practice means the "make this" command will fail unless it is typed as "sudo make this" instead. Forgetting to start the command with "sudo" is a fairly common and frustrating mistake for people who administer UNIX systems or their personal Linux computer. They then need to repeat the command with "sudo," whereupon the computer responds obediently, and everything works smoothly.

Cueball is demanding a sandwich from his friend. Not being properly asked, the friend denies the request. Cueball then (ab)uses the sudo command on the friend, who then has no choice but to go and make the sandwich, and now does so without complaint, because Cueball has all the rights. For anyone versed in installing system software with the make command, this exchange is intensely reminiscent of the analogous onscreen experience.

Simon Says is a children's game in which a leader gives various commands that must be followed if and only if (iff) the leader prefixes the command with "Simon says." The title text compares the way the computer will run some commands if they are preceded with "sudo" to the way Simon Says players are supposed to follow orders if (and only if) they are preceded with "Simon says."

Alternatively, the title text might merely be referring to the similarity between Cueball ordering his friend around with "sudo" to the Simon Says game leader ordering other players around. Wikipedia suggests that the "Simon" in the name of the game may be the powerful lord Simon de Montfort, or a corruption of Cicero, both of whom were influential politicians of their day.

Transcript

[Cueball is sitting on a couch, talking to a Cueball-like friend.]
Cueball: Make me a sandwich.
Friend: What? Make it yourself.
Cueball: Sudo make me a sandwich.
Friend: Okay.

Trivia

  • This comic is available as a T-shirt in the xkcd store.
  • This comic is available as a signed print in the xkcd store.


comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!

Discussion

Note that it is more effective to write "sudo !!" to redo the last command but with sudo added to it. -- Agge.se (talk) (please sign your comments with ~~~~)

Using sudo !! outputs the previous command with sudo into your bash (other shells as well) history, so to bash what you said was "sudo make me a sandwich" not "sudo !!". lcarsos (talk) 16:46, 29 October 2012 (UTC)

sudo requires user password, not admin password, but you need to be in sudoers file. --JakubNarebski (talk) 12:14, 15 December 2012 (UTC)

How many people will know the difference? In a typical Ubuntu-family install with only one human user, root doesn't have a password, but the one user who does is a sudoer (and has to use sudo or su to act as root, rather than doing so starting at login). Promethean (talk) 06:08, 30 August 2013 (UTC)

"the user first must type their password" This is not accurate. It is the default, but many domains disable that requirement. 173.245.52.92 06:47, 14 January 2015 (UTC)

I believe the original comic actually read "Sudo bang bang" instead of "Sudo make me a sandwich". Here's a link to what I think is a copy of the original. I'm not sure which of the two is actually the original. ‎99.95.158.248 (talk) (please sign your comments with ~~~~)

The words "bang bang" (particularly the first B) look a bit fuzzy/pixelated compared to the rest of the text, which gives me the feeling that it was edited from this one, which is the original. Zowayix (talk) 23:03, 23 January 2014 (UTC)
If you click on the image (on the Stack Overflow link), it leads you to http://justinsomnia.org/2006/09/sudo-bang-bang/, which says: 'This just occurred to me' [comic] 'Original comic from xkcd by Randall Munroe', implying it was indeed edited. 141.101.99.14 20:42, 11 August 2014 (UTC)
Also, Randall doesn't make his Gs like that. You can see in the strip immediately previous. 108.162.237.4 05:16, 27 November 2018 (UTC)
On a different, but totally related note: Here you can find an aptly named little program with which the charming conversation would be: "Make me a sandwich." - "What? Make it yourself." - "Fuck." - "Okay." 162.158.85.135 08:24, 28 June 2016 (UTC)

Comment: This conversation is an easter egg in Google Now on Android tablet. Using voice search to say "make me a sandwich" will give the reply "what? make it yourself", adding "sudo" will get the response "ok". I assume the Google now implementation came later and is based on xkcd. 141.101.99.27 (talk) (please sign your comments with ~~~~)

Sadly, it doesn't exist in the new Google Assistant.
Siri will also respond "okay" if you say "sudo make me a sandwich:", though she doesn't respond with the XKCD response to "make me a sandwich". 198.41.235.35 13:32, 27 October 2015 (UTC) (MSC)

This reworked for the Make utility:

$ make sandwich
Must be root
$ sudo make sandwich
cc sandwich
mv sandwich /etc/sandwich
sandwich installed in /etc
$ _

Alexbuzzbee (talk) 02:50, 23 August 2015 (UTC)

  • It also reminds me the Star Trek: Voyager episode where Q tampered with the ship's replicators:
Janeway: "Coffee, black."
Replicator: "Make it yourself."

(But she didn't try "Sudo coffee, black.") - Mike Rosoft (talk) 18:14, 13 March 2016 (UTC)

  • This forfells the advent of Alexa and the other personal home assistants. 162.158.155.50 20:19, 14 October 2017 (UTC)
  • I wonder whether Cueball pronounces "sudo" the right way (because surely he knows the right way) or the wrong way (engaging his hobby, or matching the expectations of the friend.) 172.68.142.89 16:04, 15 June 2018 (UTC)

If the pronunciation of sudo is "soo doo" (because "do" is a word), then should it actually be pronounced "ess yoo doo" — pronouncing "s" and "u" separately (because "su" is an initialism of "super user"/"substitute user")? (Is the su command pronounced "soo" or "ess yoo"?) -- Yfmcpxpj (talk) 14:30, 6 December 2019 (UTC)