@@ -0,0 +1,91 @@
1+# Install Instructions
2+
3+It is easier to use the Mac installer, but it should be possible to install by running the following commands in your terminal:
4+
5+```bash
6+# Move to your Desktop so you can see what is going on easier.
7+#
8+cd ~/Desktop/
9+
10+# Download the 0.19.0 binary for Linux.
11+#
12+# +-----------+----------------------+
13+# | FLAG | MEANING |
14+# +-----------+----------------------+
15+# | -L | follow redirects |
16+# | -o elm.gz | name the file elm.gz |
17+# +-----------+----------------------+
18+#
19+curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.0/binary-for-mac-64-bit.gz
20+
21+# There should now be a file named `elm.gz` on your Desktop.
22+#
23+# The downloaded file is compressed to make it faster to download.
24+# This next command decompresses it, replacing `elm.gz` with `elm`.
25+#
26+gunzip elm.gz
27+
28+# There should now be a file named `elm` on your Desktop!
29+#
30+# Every file has "permissions" about whether it can be read, written, or executed.
31+# So before we use this file, we need to mark this file as executable:
32+#
33+chmod +x elm
34+
35+# The `elm` file is now executable. That means running `~/Desktop/elm --help`
36+# should work. Saying `./elm --help` works the same.
37+#
38+# But we want to be able to say `elm --help` without specifying the full file
39+# path every time. We can do this by moving the `elm` binary to one of the
40+# directories listed in your `PATH` environment variable:
41+#
42+sudo mv elm /usr/local/bin/
43+
44+# Now it should be possible to run the `elm` binary just by saying its name!
45+#
46+elm --help
47+```
48+
49+<br/>
50+
51+## What is the `PATH` variable?
52+
53+When you run a command like `elm make src/Main.elm`, your computer starts by trying to find an executable file called `elm`.
54+
55+The `PATH` is the list of directories that get searched. You can see these directories by running:
56+
57+```bash
58+echo $PATH
59+```
60+
61+This prints `/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin` on my computer. The directories are separated by a `:` so there are five possibilities listed here.
62+
63+When I run `elm make src/Main.elm`, my terminal starts by searching these five directories for an executable file named `elm`. It finds `/usr/local/bin/elm` and then runs `/usr/local/bin/elm make src/Main.elm` with whatever arguments I gave.
64+
65+So the `PATH` environment variable is a convention that allows you to refer to a specific executable file without knowing exactly where it lives on your computer. This is actually how all "terminal commands" work! Commands like `ls` are really executable files that live in directories listed in your `PATH` variable.
66+
67+So the point of running `sudo mv elm /usr/local/bin/` is to turn the `elm` binary into a terminal command, allowing us to call it just like `ls` and `cd`.
68+
69+**Note:** Why do we need to use `sudo` for that one command? Imagine if some program was able to add executables named `ls` or `cd` to `/usr/local/bin` that did something tricky and unexpected. That would be a security problem! Many distributions make this scenario less likely by requiring special permissions to modify the `/usr/local/bin/` directory.
70+
71+
72+<br/>
73+
74+## Uninstall
75+
76+The following commands should remove everything:
77+
78+```bash
79+# Remove the `elm` executable.
80+#
81+sudo rm /usr/local/bin/elm
82+
83+# Remove any cached files. The files here reduce compile times when
84+# starting new projects and make it possible to work offline in more
85+# cases. No need to keep it around if you are uninstalling though!
86+#
87+rm -r ~/.elm/
88+```
89+
90+If you have any Elm projects still on your computer, you can remove their `elm-stuff/` directories as well.
91+