Skip to content

Commit

Permalink
Split core setup guide by OS (#159)
Browse files Browse the repository at this point in the history
* Created folder paths for each OS, duplicated setup steps in each

* Removed Windows and Linux instructions from Mac path

* Removed Mac instructions from Windows path

* Removed Windows and Mac instructions from Linux path

* Moved original files back to previous location
  • Loading branch information
kassiebradshaw authored Aug 25, 2022
1 parent 26a1605 commit a45f645
Show file tree
Hide file tree
Showing 39 changed files with 1,445 additions and 15 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ Please follow the correct path below, based on the course that you are registere

### Begin by selecting your Operating System


[MacOS](./system-setup/README.md) | [Ubuntu Linux](./system-setup/README.md) | [Windows 10](./windows/windows-10.md) | [Windows 11](./windows/windows-11.md)

[MacOS](./system-setup/mac/README.md) | [Ubuntu Linux](./system-setup/linux/README.md) | [Windows 10](./system-setup/windows/windows-10.md) | [Windows 11](./system-setup/windows/windows-11.md)

## Path 2 - For students registered for `Ops-102`, `Ops-201`, `Ops-301`, or `Ops-401` only

Expand Down
34 changes: 34 additions & 0 deletions system-setup/linux/1-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Backup Your Terminal/Shell Environment

This section will talk about how to update the Terminal's look and feel, as well as how to edit files using the command line editor, `nano`

At the end of this guide, we will add some color to your command line, and your command line will be formatted for development.

## Backing up files

The first thing we'll do is backup your existing terminal setup.

There are a lot of ways that your terminal can be set up determined by different configuration files.

We want to remove the old ways so we can start with a clean slate.

Make back ups of the files listed below. You may get a `No such file or directory` error for some of them. That's ok.

- `mv ~/.bashrc .bashrc.bak`
- `mv ~/.bash_profile .bash_profile.bak`
- `mv ~/.profile .profile.bak`
- `mv ~/.zshrc .zshrc.bak`

## Install Z Shell

```bash
sudo apt-get install zsh
```

After installing, type `zsh`. Zsh will ask you to choose some configuration. We will do this later by installing `oh-my-zsh`. Chose option 0 to create the config file (prevent this message to show again).

Now, let's move on to getting our development applications installed.

---

### [⇐ Previous](./README.md) | [Next ⇒](./2-apt.md)
35 changes: 35 additions & 0 deletions system-setup/linux/10-vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Install VSCode Text Editor

Now it's time to install VSCode Text Editor, a sophisticated text editor for code, markup, and prose.

> **Follow the below instructions in order**, paying attention to any notes specific to Windows or Mac, depending on your operating system.
## Get Started

- Close any open terminal windows.
- Download [VSCode](https://code.visualstudio.com/download) and install.
- If this window displays during set up, be sure the following boxes are selected
![VSCode](../vscode.png)

### Install Additional VSCode Extensions

We'll now be adding some functionality to your new code editor by installing a number of extensions.

- You can open VSCode through your terminal using `code .`
- On the bottom left hand side you will see a settings ("gear") icon.
- Click this, then click "Extensions".
- A side-bar will slide out and at the top you can search for the listed extensions below, and click the green 'Install' button for each:
- liveserver
- ESLint
- markdownlint
- editorconfig
- HTML Preview
- Thunder Client

There are many other extensions to choose from that will make your coding life a lot easier. Your instructors, TAs and classmates will all be great resources as to what works well for them.

[VSCode's documentation](https://code.visualstudio.com/docs) is excellent. Review it now to familiarize yourself with the basics.

---

### [⇐ Previous](./9-eslint.md) | [Next ⇒](./11-verify.md)
38 changes: 38 additions & 0 deletions system-setup/linux/11-verify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Verify Your Setup Part 1

> By the time you’ve completed the guide, you should be able to run the following commands in your terminal and see the expected output. Your versions may be slightly different than what is listed here due to recent updates.
- `code --version`
- `1.64.2`
- `git --version`
- `git version 2.34.1`
- `node --version`
- `v17.31.1`
- `npm --version`
- `8.3.0`
- `eslint --version`
- `v8.1.0`
- `tree --version`
- `tree v2.0.1 (c) 1996 - 2018 ...`
- `git config --list` should contain at least the following:
- `user.name=YOUR NAME`
- `user.email=YOUR EMAIL`
- `core.editor=code --wait`
- `init.defaultbranch=main`
- Type the letter `q` to exit the config screen and return to the previous screen.
- `code .`
- should open VS Code with your current folder contents

## Verify Your Setup Part 2

Run the following command

```bash
curl -Ls https://bit.ly/3qMWhbE | bash
```

You should get a successful message. If you do not see `By gum, you've done it!`, look at the output from the steps in part 1 to begin troubleshooting. Get TA assistance as necessary.

---

### That's It! [Back To the Beginning](../../README.md)
15 changes: 15 additions & 0 deletions system-setup/linux/2-apt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Installing and Updating the Linux App Manager

For some things on your system, we will be using `apt` to install applications. The first thing we'll want to do is get that up to date with all of the latest versions and information

**OPEN YOUR UBUNTU TERMINAL** and let's get started!

1. Type `sudo apt-get update`.
- Provide your password, when prompted (***Note:*** *You will not have any visual feedback on your screen as you type. It is protecting your password by not displaying ANYTHING at all to the screen, but it is registering your key strokes.*)
1. Once that is complete, type `sudo apt-get upgrade`. Press `y` when prompted.
1. Once that is done, type `sudo apt autoremove`. This will remove any packages that are no longer needed.
1. Install the "Build Essentials" kit with this command: `sudo apt-get install build-essential`

---

### [⇐ Previous](./1-environment.md) | [Next ⇒](./3-homebrew.md)
74 changes: 74 additions & 0 deletions system-setup/linux/3-homebrew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Install "Homebrew"

Homebrew is a tool that simplifies installing applications on your machine. Think of it like an app store for your computer.

---

## Verify if Homebrew is already installed

- In your terminal, run: `brew --version`
- *If output is similar to:* `Homebrew 3.4.11`
- Run: `brew update` to get latest updates
- Move on to [next page](./4-git.md)
- *If output is not similar to the above*, continue with instructions on this page.

---

In your terminal, enter the following command:

- `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
- You will be prompted several times along the way. Enter your password when prompted, accept all the defaults, say "Yes" if prompted. (***Note:*** *You will not have any visual feedback on your screen as you type. It is protecting your password by not displaying ANYTHING at all to the screen, but it is registering your key strokes.*)
- Once the main installation finishes (could take up to 30 minutes), enter these commands, one at a time in your terminal - they should produce no errors, and do not produce success messages:
- `test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)`
- `test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)`

Once the installation has completed, **run:**

`brew doctor`

**if** return output is:

```bash
Your system is ready to brew
```

**or** return output is:

```text
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
```

**then run:**

`brew update`

**else if** return output is:

```bash
brew: command not found
```

**then** run these commands

1. ```echo 'export BREW_HOME="/home/linuxbrew/.linuxbrew/bin"' >> $HOME/.zprofile```
1. ```echo 'export PATH="$PATH:$BREW_HOME"' >> $HOME/.zprofile```
1. ```reset```


> **If `brew update` still fails to run, [click here](../../error/error.md) and do not continue with the following steps until you have Homebrew properly installed**
## Install "gcc"

In order for Homebrew to install other applications, it needs a tool called **gcc** to assist itself.

Run this command in your terminal:

`brew install gcc`

When that completes, you will be returned to the command prompt and can move on to the next steps.

---

### [⇐ Previous](./2-apt.md) | [Next ⇒](./4-git.md)
68 changes: 68 additions & 0 deletions system-setup/linux/4-git.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Git

## Verify if Git & GitHub are already installed:

- In your terminal, run: `git config --list`
- **Note**: To exit the git config --list screen, type the letter `q` in your terminal
- *If the output is similar to:*

- ```bash
user.name=[Your name is here]
user.email=[Your email is here]
code.editor=code --wait
init.defaultbranch=main
```

- Then move on to [next page](./5-tree.md)
- *If output is not similar to the above*, continue with instructions on this page.

---

## Install and Configure Git and GitHub

Run the following command to ensure that you have the most recent version of git:

`brew install git || brew upgrade git`

## Setup GitHub for "Authentication"

In order to use Git locally in a secure manner, we need to connect our computer with github.com.

[GitHub Instructions: Caching GitHub credentials](https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git)

- Install CLI by completing the following steps:
- run in terminal: `brew install gh`
- run in terminal: `gh auth login`
- Use arrow key to select **GitHub.com**
- Select **HTTPS**
- When prompted with Authenticate Git with your GitHub credentials (Y / n). Press `y` and enter
- Click **Login with a web browser**
- Copy the one time code shown in yout terminal and then press enter. This will open github.com in a web page.
- If not signed in, you will be prompted to signin.
- Github will prompt you for the one time code. Enter in the appropriate boxes.
- Click **Authorize github**
- You can close the web browser and press enter in your terminal to continue.

## Git Config

Like artists, programmers sign their work. Let's configure Git to sign your commits with your name and email address.
**WARNING:** Before running the following commands one line at at time, replace `YOUR FULL NAME` and `YOUR EMAIL ADDRESS` with the name and email from [Your GitHub Account](https://github.com/settings/profile)
```bash
git config --global user.name 'YOUR FULL NAME'
```
```bash
git config --global user.email 'YOUR EMAIL ADDRESS'
```
```bash
git config --global core.editor "code --wait"
```
```bash
git config --global init.defaultbranch main
```
### [⇐ Previous](./3-homebrew.md) | [Next ⇒](./5-tree.md)
46 changes: 46 additions & 0 deletions system-setup/linux/5-tree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Tree

Tree is a useful application that will allow you to look at a directory structure and files that are in a directory.

```text
# Example of what an output may look like
── courses
├── code102
├── code201
```

---

## Verify if Tree is already installed:

- In your terminal, run: `tree --version`
- *If output is this version or higher:*

- ``` bash
tree v2.0.2 (c) 1996 - 2022 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
```

- Continue to [next page](./6-ohmyzsh.md)
- *If output is not similar to the above*, continue with instructions on this page.

---

## Installation

**Run:**

`brew install tree`

Verify tree is installed by **running:**

`tree --version`

Expected Output:

```bash
tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
```

---

### [⇐ Previous](./4-git.md) | [Next ⇒](./6-ohmyzsh.md)
37 changes: 37 additions & 0 deletions system-setup/linux/6-ohmyzsh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Oh-My-Zsh

Now it's time to unleash your terminal potential.

## Verify if Oh-My-Zsh is already installed

- In your terminal, run: `zsh --version`
- *If output is this version or higher*:
- `zsh 5.8`
- Continue to [next page](./7-node.md)
- *If output is not similar to the above*, continue with instructions on this page.

---

## Installation

The following is pulled from [Oh My Zsh.](https://ohmyz.sh/)

Run the following command in your termainl.

`sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"`

> **NOTE:** You may get a questions asking if you want to update your terminal to `zsh`. Say `yes` to this. If any warnings or errors occur, be sure to complete what is being suggested or get help.
At this point you `must` restart your terminal.

## Bookmark

Bookmark these site to reference later through other classes as needed.

Lots of customization avaliable on their [github repo.](https://github.com/ohmyzsh/ohmyzsh/)

This is a link to a [cheatsheet.](https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet)

---

### [⇐ Previous](./5-tree.md) | [Next ⇒](./7-node.md)
Loading

0 comments on commit a45f645

Please sign in to comment.