Skip to content

Commit

Permalink
Add first cut of Linux install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
chastell committed May 13, 2018
1 parent 68aec97 commit c42e31a
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/welcome.tw2
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ That being said, let's start with our first question!
---
## Which OS do you use?

- [[Linux->Linux Introduction]]
- [[Mac->Mac Introduction]]

44 changes: 44 additions & 0 deletions linux/architecture.tw2
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
::Linux architecture
# Determine process architecture on Linux

To determine your process architecture, paste
in the following command into your terminal:

```
uname -m
```

Hit `Enter` after you’ve pasted in the command and examine the output.

## `x86_64`

If the output is `x86_64` then you’re on a 64-bit architecture.

The file you’re looking for is `exercism-linux-64bit.tgz`.

## `i686`

If the output is `i686` then you’re on a 32-bit architecture.

The file you’re looking for is `exercism-linux-32bit.tgz`.

## `armv5l`, `armv6l`, `armv7l` or `armv8l`

If the output is `armv5l`, `armv6l`, `armv7l`
or `armv8l` then you’re on an ARM architecture.

The file you’re looking for is `exercism-linux-arm-v5.tgz`,
`exercism-linux-arm-v6.tgz`, `exercism-linux-arm-v7.tgz`
or `exercism-linux-arm-v8.tgz` (respectively).

## Other

If your output doesn’t match any of the above, click on _I
don’t know_ below and we could recommend steps to help you.

---

## Do you know your system’s process architecture?

- [[Yes->Linux tarball]]
- [[No->Talk to a Volunteer]]
40 changes: 40 additions & 0 deletions linux/directory.tw2
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
::Linux directory
# Moving the Exetuable to `~/bin`

Once you downloaded and extracted the
archive you need to put in `~/bin`.

First, let’s make sure the directory exists:

```
mkdir -p ~/bin
```

Next, let’s move the `exercism` executable there:

```
mv exercism ~/bin
```

Make sure everything worked:

```
~/bin/exercism
```

The above should output something like the below:
```
NAME:
exercism - A command line tool to interact with http://exercism.io

USAGE:
exercism [global options] command [command options] [arguments...]
```

---

## Did running `~/bin/exercism` outout something like the above?

- [[Yes->Linux path]]
- [[No->Talk to a Volunteer]]
14 changes: 14 additions & 0 deletions linux/introduction.tw2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
::Linux Introduction
# Installing Exercism on Linux

To install Exercism on Linux you need to get the `exercism`
executable; different process architectures have different
`exercism` executables, so you need to install the
right exectuable matching your process architecture.

---

## Do you know your process architecture (32-bit vs 64-bit vs ARM)?

- [[Yes->Linux tarball]]
- [[No->Linux architecture]]
47 changes: 47 additions & 0 deletions linux/path.tw2
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
::Linux path
# Adding `~/bin` to `$PATH` in Bash

Note: If you’re not running Bash try to adjust the
below to your shell or [[Talk to a Volunteer]].

To have the `exercism` executable available everywhere on the
command line you need to make sure `~/bin` is in your `$PATH`.

There is a chance it’s there already; let’s see whether it is:

```
[[ ":$PATH:" == *":$HOME/bin:"* ]] && echo "~/bin is in PATH" || echo "~/bin is not in PATH"
```

If the above prints `~/bin is not in PATH` let’s add
`~/bin` to `$PATH` and reload Bash configuration:

```
echo "export PATH=~/bin:$PATH" >> ~/.bash_profile
source ~/.bash_profile
```

To check whether this worked, go to your home directory
and try to run `exercism` without providing the path:

```
cd
exercism
```

The above should output something like the below:
```
NAME:
exercism - A command line tool to interact with http://exercism.io

USAGE:
exercism [global options] command [command options] [arguments...]
```

---

## Did running `exercism` outout something like the above?

- [[Yes->Installation complete]]
- [[No->Talk to a Volunteer]]
30 changes: 30 additions & 0 deletions linux/tarball.tw2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
::Linux tarball
# Getting the Executable

## Download the archive

If you know your process architecture (32-bit vs 64-bit vs
ARM), download the appropriate archive from the [releases
page](https://github.com/exercism/cli/releases/latest).

## Extract from the archive

Once you have the archive downloaded you
need to extract the executable from it.

* If you’re using a graphic interface (e.g., GNOME or
Unity on Ubuntu): go to your downloads directory, right
click on the downloaded file and select _Extract Here_.

* If you’re using the command line (use the
right archive file name for your architecture):
```
tar -xf exercism-linux-64bit.tgz
```

---

## Next steps:

- [[Continue->Linux directory]]
- [[I don’t know my process architecture->Linux architecture]]
6 changes: 6 additions & 0 deletions table_of_contents.tw2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ common/welcome.tw2
common/install_complete.tw2
common/talk_to_a_volunteer.tw2

linux/architecture.tw2
linux/directory.tw2
linux/introduction.tw2
linux/path.tw2
linux/tarball.tw2

mac/introduction.tw2
mac/opening_the_terminal.tw2
mac/opening_the_terminal_troubleshooting.tw2
Expand Down

0 comments on commit c42e31a

Please sign in to comment.