<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ur-wrong</id>
		<title>explain xkcd - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ur-wrong"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php/Special:Contributions/Ur-wrong"/>
		<updated>2026-04-30T12:43:07Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=1654:_Universal_Install_Script&amp;diff=114671</id>
		<title>1654: Universal Install Script</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=1654:_Universal_Install_Script&amp;diff=114671"/>
				<updated>2016-03-11T07:50:42Z</updated>
		
		<summary type="html">&lt;p&gt;Ur-wrong: /* Explanation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 1654&lt;br /&gt;
| date      = March 11, 2016&lt;br /&gt;
| title     = Universal Install Script&lt;br /&gt;
| image     = universal_install_script.png&lt;br /&gt;
| titletext = The failures usually don't hurt anything, and if it installs several versions, it increases the chance that one of them is right. (Note: The 'yes' command and '2&amp;gt;/dev/null' are recommended additions.)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
{{incomplete|This is an initial summary. Please check the facts about the repositories, I am not 100% familiar with them. Maybe a note should be made of Steam's odd presence and the reason for &amp;quot;apt-get &amp;amp; sudo apt-get&amp;quot;? Something like &amp;quot;many standard popular repository programs (and Steam, a game platform, which usually is not used for most programs)&amp;quot;? I'm not sure how to word it. There need to be wiki links, and the list currently in the [[#Trviia]] section should be incorporated in the main explanation (with wiki links).}}&lt;br /&gt;
&lt;br /&gt;
Most users of computers today are used to simple, easy installation of programs. You just download a .exe or a .dmg, double click it, and do what it says. Sometimes you don't even have to install anything at all, and it runs by itself, no problems.&lt;br /&gt;
&lt;br /&gt;
However, when things are more &amp;quot;homebrew&amp;quot;, for example downloading source code, things are more complicated. You have to work with &amp;quot;build environments&amp;quot; and &amp;quot;makefiles&amp;quot;, and command line interfaces. To make this process simpler, there exist repositories of programs which host packages of source code and the things needed to build it. When you download the package, it automatically does most of the work of building the code into something executable. However, there are many such repositories, such as &amp;quot;pip&amp;quot; and &amp;quot;brew&amp;quot;, among others listed in the comic. If you only know the name of a program, you may not know on which repository(ies) it resides.&lt;br /&gt;
&lt;br /&gt;
The script provided in the comic attempts to fix this problem, by giving a &amp;quot;universal install script&amp;quot;. It accepts the name of a program when you run it, and stores it in &amp;quot;$1&amp;quot;. This value is then referenced for a large number of commands. Everywhere the script says &amp;quot;$1&amp;quot;, it puts in the name of the program you gave it. The end result is the name being tried against a large number of software repositories, and hopefully, at least one of them will match and the program will be successfully installed. At the  end, it even tries changing into the directory that is assumed to hold the newly installed package, and then runs several commands which build the program.&lt;br /&gt;
&lt;br /&gt;
All in all, this script would probably work; it runs many standard popular repository programs, and runs the nearly-universal commands to build the program.&lt;br /&gt;
&lt;br /&gt;
One of the more subtle jokes in the comic is the inclusion of &amp;lt;code&amp;gt;apt-get&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sudo apt-get&amp;lt;/code&amp;gt; in the same script. In most cases this would be redundant as the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command is just to add admin permissions. This could be a reference to a joke in the Linux community about forgetting to include the sudo command. An example of this joke being used elsewhere was a  [https://twitter.com/liamosaur/status/506975850596536320 viral tweet] that showed a workaround for the issue. Sudo has also been used both by [[Randall]] in [[149: Sandwich]] and by Bill Amend to force Randall to let him appear on xkcd with [[824: Guest Week: Bill Amend (FoxTrot)]].&lt;br /&gt;
&lt;br /&gt;
The tool &amp;lt;code&amp;gt;curl&amp;lt;/code&amp;gt; downloads files from the internet or network. Used like &amp;lt;code&amp;gt;curl http://xkcd.com/&amp;lt;/code&amp;gt; it downloads the XKCD main page and prints it on the screen. The pipe &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; attaches the output of the command before the pipe to the input of the command after the pipe. Both commands are executed at the same time. &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; is a popular terminal for unix OS. The line &amp;lt;code&amp;gt;curl &amp;quot;$1&amp;quot; | bash&amp;lt;/code&amp;gt; tries to download a file from the internet and executes it directly. Although this is a common practice for conveniently installing software, it is considered extremely insecure and should never be done.&lt;br /&gt;
&lt;br /&gt;
The title text mentions the possibility that the same program may be on multiple repositories, so in this case, the script will download and install several versions, or it may fail on a number of repositories, in which case usually nothing bad happens. It mentions that adding a way of automatically saying &amp;quot;yes&amp;quot; to questions asked during the different repository-fetching programs' running could simplify things further. &amp;lt;code&amp;gt;2&amp;gt;/dev/null&amp;lt;/code&amp;gt; redirects the second output stream (the &amp;quot;error stream&amp;quot;) to the pseudo-file &amp;lt;code&amp;gt;/dev/null&amp;lt;/code&amp;gt; which discards all writes to it.&lt;br /&gt;
&lt;br /&gt;
The use of &amp;amp; at the end of each line causes the terminal or shell interpreter to execute the commands in parallel instead of sequential. Even if single commands fail, the rest of them will be executed. Note this is even the case for the final commands that attempt to change to the installed package, probably the only reason why this may not work completely for packages that do need compiling after being downloaded. (However, just running this script again would probably do the trick.)&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
:[In the panel is a shell script which, unusual for xkcd, uses only lower case. At the top the title of the program is inlaid in the frame, which has been broken here.]&lt;br /&gt;
:&amp;lt;big&amp;gt;Install.sh&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;nowiki&amp;gt;#!/bin/bash&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:pip install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:easy_install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:brew install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:npm install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:yum install &amp;quot;$1&amp;quot; &amp;amp; dnf install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:docker run &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:pkg install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:apt-get install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:sudo apt-get install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:steamcmd +app_update &amp;quot;$1&amp;quot; validate &amp;amp;&lt;br /&gt;
:git clone &amp;lt;nowiki&amp;gt;https://github.com/&amp;lt;/nowiki&amp;gt;&amp;quot;$1&amp;quot;/&amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
:cd &amp;quot;$1&amp;quot;;./configure;make;make install &amp;amp;&lt;br /&gt;
:curl &amp;quot;$1&amp;quot; | bash &amp;amp;&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
*pip and easy install are package managers for Python&lt;br /&gt;
*brew is the successor/replacement for MacPorts and a package manager for OS X&lt;br /&gt;
*npm is the node package manager that maintains node.js packages&lt;br /&gt;
*pgk is the package management tool on BSD systems&lt;br /&gt;
*apt-get is the package management tool of choice on debian and derivatives (eg Ubuntu)&lt;br /&gt;
*steamcmd refers to Steam the computer game company and its client&lt;br /&gt;
*git is the revision control software used for eg. the linux kernel and gained a lot of traction through the github plattform&lt;br /&gt;
*configure/make/make install refers to the default way of compiling software from source (on Linux/Unix)&lt;br /&gt;
*curl is a tool for loading data via http:// (eg from a website), this data is then pushed to the shell interpreter (in order to install). &lt;br /&gt;
**Note: While this is a security nightmare, the Nvidia drivers for Linux were (and may still are) installed like that&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Ur-wrong</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=1654:_Universal_Install_Script&amp;diff=114661</id>
		<title>1654: Universal Install Script</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=1654:_Universal_Install_Script&amp;diff=114661"/>
				<updated>2016-03-11T06:52:52Z</updated>
		
		<summary type="html">&lt;p&gt;Ur-wrong: /* Explanation */ Fixed error about the &amp;amp;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 1654&lt;br /&gt;
| date      = March 11, 2016&lt;br /&gt;
| title     = Universal Install Script&lt;br /&gt;
| image     = universal_install_script.png&lt;br /&gt;
| titletext = The failures usually don't hurt anything, and if it installs several versions, it increases the chance that one of them is right. (Note: The 'yes' command and '2&amp;gt;/dev/null' are recommended additions.)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
{{incomplete|This is an initial summary. Please check the facts about the repositories, I am not 100% familiar with them. Maybe a note should be made of Steam's odd presence and the reason for &amp;quot;apt-get &amp;amp; sudo apt-get&amp;quot;? Something like &amp;quot;many standard popular repository programs (and Steam, a game platform, which usually is not used for most programs)&amp;quot;? I'm not sure how to word it.}}&lt;br /&gt;
Most users of computers today are used to simple, easy installation of programs. You just download a .exe or a .dmg, double click it, and do what it says. Sometimes you don't even have to install anything at all, and it runs by itself, no problems.&lt;br /&gt;
&lt;br /&gt;
However, when things are more &amp;quot;homebrew&amp;quot;, for example downloading source code, things are more complicated. You have to work with &amp;quot;build environments&amp;quot; and &amp;quot;makefiles&amp;quot;, and command line interfaces. To make this process simpler, there exist repositories of programs which host packages of source code and the things needed to build it. When you download the package, it automatically does most of the work of building the code into something executable. However, there are many such repositories, such as &amp;quot;pip&amp;quot; and &amp;quot;brew&amp;quot;, among others listed in the comic. If you only know the name of a program, you may not know on which repository(ies) it resides.&lt;br /&gt;
&lt;br /&gt;
The script provided in the comic attempts to fix this problem, by giving a &amp;quot;universal install script&amp;quot;. It accepts the name of a program when you run it, and stores it in &amp;quot;$1&amp;quot;. This value is then referenced for a large number of commands. Everywhere the script says &amp;quot;$1&amp;quot;, it puts in the name of the program you gave it. The end result is the name being tried against a large number of software repositories, and hopefully, at least one of them will match and the program will be successfully installed. At the very end, it changes into the directory that is assumed to hold the newly installed package, and then runs several commands which build the program.&lt;br /&gt;
&lt;br /&gt;
All in all, this script would probably work; it runs many standard popular repository programs, and runs the nearly-universal commands to build the program.&lt;br /&gt;
&lt;br /&gt;
One of the more subtle jokes in the comic is the inclusion of &amp;lt;code&amp;gt;apt-get&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sudo apt-get&amp;lt;/code&amp;gt; in the same script. In most cases this would be redundant as the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command is just to add admin permissions. This could be a reference to a joke in the Linux community about forgetting to include the sudo command. An example of this joke being used elsewhere was a  [https://twitter.com/liamosaur/status/506975850596536320 viral tweet] that showed a workaround for the issue.&lt;br /&gt;
&lt;br /&gt;
The title text mentions the possibility that the same program may be on multiple repositories, so in this case, the script will download and install several versions, or it may fail on a number of repositories, in which case usually nothing bad happens. It mentions that adding a way of automatically saying &amp;quot;yes&amp;quot; to questions asked during the different repository-fetching programs' running could simplify things further.&lt;br /&gt;
&lt;br /&gt;
The use of &amp;amp; at the end of each line causes the terminal or shell interpreter to execute the commands in parallel instead of sequential. Even if single commands fail, the rest of them will be executed.&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
{{incomplete transcript}}&lt;br /&gt;
&lt;br /&gt;
[The comic is shown in a rectangular box, with the title &amp;quot;INSTALL.SH&amp;quot; at the top. Below it is a shell script:]&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
pip install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
easy_install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
brew install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
npm install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
yum install &amp;quot;$1&amp;quot; &amp;amp; dnf install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
docker run &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
pkg install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
apt-get install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
sudo apt-get install &amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
steamcmd +app_update &amp;quot;$1&amp;quot; validate &amp;amp;&lt;br /&gt;
git clone https://github.com/&amp;quot;$1&amp;quot;/&amp;quot;$1&amp;quot; &amp;amp;&lt;br /&gt;
cd &amp;quot;$1&amp;quot;;./configure;make;make install &amp;amp;&lt;br /&gt;
curl &amp;quot;$1&amp;quot; | bash &amp;amp;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;/div&gt;</summary>
		<author><name>Ur-wrong</name></author>	</entry>

	</feed>