Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foundations / Installation Overview: Preliminary WSL2 Introduction #25402

Merged
merged 37 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
84b141c
Update installation_overview.md
xandora Apr 29, 2023
b20a9c8
Add WSL instructions to HTML foundations Links and Images
RyanMcEntire May 8, 2023
0813506
update text-editors for WSL
Asartea Jul 21, 2023
387c6da
added instructions on using WSL in command_line_basics.md
Saad-Mehr Jul 22, 2023
0f51df9
Merge branch 'wsl-inclusion' of github.com:xandora/curriculum into ws…
Saad-Mehr Jul 25, 2023
4498f05
Add WSL Chrome installation instructions
Asartea Jul 29, 2023
962de65
Add WSL installation instructions
Asartea Jul 29, 2023
56974f0
Merge branch 'main' into wsl-inclusion
Asartea Jul 31, 2023
76075b6
Installations: Add instructions to enable systemd on WSL
Asartea Aug 4, 2023
aaed4a3
fix typo
Asartea Aug 4, 2023
5bcab2a
Change occurences of WSl to WSL2
Asartea Aug 4, 2023
fc020ba
Clarify systemd instructions
Asartea Aug 4, 2023
054fea4
clarify powershell instructions
Asartea Aug 4, 2023
b1310a9
Drop systemd instructions: Causes VSCode to break
Asartea Aug 5, 2023
3c10c72
move WSL description to overview
Asartea Aug 5, 2023
c335d9d
Clarify Windows Terminal instructions
Asartea Aug 5, 2023
e0aee95
Clarify password not giving visual feedback
Asartea Aug 5, 2023
e89efba
Add note on different color schemes for terminal v Ubuntu
Asartea Aug 5, 2023
af01020
Change instructions to be clearer on what needs to be activated
Asartea Aug 5, 2023
9d85c25
Add note on WSL not supporting systemctl
Asartea Aug 5, 2023
d2915ad
no comment
Asartea Aug 6, 2023
64d8989
Apply suggestions from code review
Asartea Aug 7, 2023
18f2f53
Fix style guide issues
Asartea Aug 7, 2023
0e29b52
Fix style guide issues
Asartea Aug 7, 2023
4d8f8e9
Update foundations/installations/installations.md
xandora Aug 28, 2023
9b85906
Update foundations/installations/installations.md
xandora Aug 28, 2023
90a534c
Update foundations/installations/command_line_basics.md
xandora Aug 28, 2023
53806c5
Apply suggestions from code review
Asartea Aug 29, 2023
238c977
Apply suggestions from code review
Asartea Aug 29, 2023
3f873b7
Apply suggestions from code review
Asartea Sep 11, 2023
19f6396
Merge branch 'main' into wsl-inclusion
Asartea Sep 21, 2023
5c009f5
implement some extra instructions
Asartea Sep 21, 2023
e2db87c
Merge branch 'main' into wsl-inclusion
Asartea Oct 1, 2023
192489d
Merge branch 'main' into wsl-inclusion
Asartea Oct 11, 2023
617be6b
Merge branch 'main' into wsl-inclusion
Asartea Oct 15, 2023
ed953f9
Merge branch 'main' into wsl-inclusion
Asartea Nov 17, 2023
0ebd80d
Update codeblock markdown
Asartea Nov 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions foundations/html_css/html-foundations/links-and-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,36 @@ For example, using an absolute path we can display an image located on The Odin

To use images that we have on our own websites, we can use a relative path.

<details markdown="block">
<summary class="dropDown-header">Linux, macOS, ChromeOS
</summary>

1. Create a new directory named `images` within the `odin-links-and-images` project.

2. Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory we just created.

3. Rename the image to `dog.jpg`.

</details>

<details markdown="block">
<summary class="dropDown-header">WSL
</summary>

When you download a file from the internet, Windows has a security feature that creates a hidden `Zone.Identifier` file with the same name as your downloaded file and it looks like `mypicture.jpg:Zone.Identifier` This file is harmless, but we'd like to avoid copying it over and cluttering up our directories.

1. Create a new directory named `images` within the `odin-links-and-images` project.

2. Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640).
Asartea marked this conversation as resolved.
Show resolved Hide resolved

Copy link
Member Author

@xandora xandora Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need the rename to dog.jpg step here?

3. Right click on the new download at the bottom of the chrome window and select "Show in folder".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, but could be good to include instructions if a user doesn't have this enabled. "Alternatively, open the "Customize and control Google Chrome" kebab menu and select the "Downloads" item. This will show all of your downloads, each with its own "Show in folder" button."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to reply to this, but this is ✅ Done


4. Drag the file from your downloads folder to VSCode's file browser into your new `images` directory.
Copy link
Member Author

@xandora xandora Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we can add a cool little gif of this action to illustrate the point?

EDIT: See the wsl2 channel for a potential option.


Dragging files from Windows into the VSCode file browser prevents the `Zone.Identifier` files from being copied over. From now on, any time you need to copy pictures or other downloaded files like this into WSL, you can do it in this way. If you ever accidentally copy these `Zone.Identifier` files into WSL, you can safely delete them without any issue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should still include some alternative instructions to drag and drop, even it means warning that copy pasting or whatever other way may result in a (harmless) duplicate file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small amount of dragging and dropping with the alternative:

  • Using your Ubuntu terminal, navigate to the folder you want to copy the image to (cd ~/odin-links-and-images for example)
  • Type cp <space>
  • Drag the dog.jpg image from a Windows Explorer window and drop it onto the terminal window, it should appear as "/mnt/c/users/username/Downloads/dog.jpg"
  • Type <space> . to tell cp that you want to copy the file to your current working directory
    • The full command will look something like cp "/mnt/c/users/username/Downloads/dog.jpg" .
  • Hit to complete the command, and use ls to confirm the file now exists

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative alternative is to just do this:

  1. Copy the file in Windows Explorer
  2. In Windows Explorer, navigate to Linux > > /home//etc
  3. Paste the file in that folder

This does get the :Zone.Identifier file, but doesn't use drag 'n drop

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the solution is as simple as updating the verbiage to "Either drag and drop or copy and paste..." or something

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the extra explanation by @xandora , which I think should be enough. If we see that lots of learners on Discord run into issues at this step we can always add extra instructions


</details>

Finally add the image to the `index.html` file:

~~~html
Expand Down
9 changes: 7 additions & 2 deletions foundations/installations/command_line_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,18 @@ This section contains a general overview of topics that you will learn in this l
<div class="lesson-content__panel" markdown="1">

**Note**: Many of these resources assume you're using a Mac or Linux environment. If you did our previous installation lesson, you should already have Linux installed in dual-boot or a virtual machine. Or, you might be using MacOS. If you don't have MacOS, or any version of Linux installed, please return to the [operating system installation guide](https://www.theodinproject.com/paths/foundations/courses/foundations/lessons/prerequisites).
<div class="lesson-note" markdown="1">
**Note for WSL users**: You will have to use the `wget` command along with the link given in the `Download files` section in order to have the zip file in your WSL installation (`wget https://swcarpentry.github.io/shell-novice/data/shell-lesson-data.zip`). You will also have to install unzip by using the command `sudo apt install unzip` and then `unzip shell-lesson-data.zip` to unzip the file. Keep in mind that throughout the course below, your terminal output may look slightly different to what is shown in the lessons. Anytime the course asks you to go to the Desktop, you will instead be going to the home directory which can be done by using the cd command (`cd ~`).
ManonLef marked this conversation as resolved.
Show resolved Hide resolved
Asartea marked this conversation as resolved.
Show resolved Hide resolved
</div>

1. Visit [The Unix Shell](https://swcarpentry.github.io/shell-novice/) course designed by the Software Carpentry Foundation. There you will find a full complement of lessons on using the CLI, but for now just focus on completing the following lessons:

* Setup (Follow instructions in `Download files` section only, this is all you need as you have the required software already)
* Introducing the Shell
* Navigating Files and Directories
* Working With Files and Directories
* Pipes and Filters

2. With your newly discovered CLI super powers, practice creating a folder and a few files using the `mkdir`, `touch`, and `cd` commands introduced in the previous step. As an example, a basic website might have a main `index.html` file, a CSS stylesheet file called `style.css`, and a folder for `images`. Think about how you could create these files with the commands and put it into practice!

3. Let's practice creating files and directories and deleting them! You'll need to enter the commands for the steps below in your terminal. If you can't recall how to open a terminal, scroll up for a reminder.
Expand Down Expand Up @@ -88,6 +91,8 @@ Third, there's a really handy shortcut for opening everything within a project d

- **macOS**: Some setup is required. After installing VSCode, launch it any way you're comfortable with. Once it's running, open the Command Palette with <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>. In the little dialog that appears, type `shell command`. One of the choices that appears will be `Shell Command: Install 'code' command in PATH`. Select that option, and restart the terminal if you have it open.

- **WSL**: Opening up VSCode from the command line in WSL is just as easy as it is in Linux. Just enter `code` which will open VSCode in WSL.

### Knowledge check

This section contains questions for you to check your understanding of this lesson on your own. If you’re having trouble answering a question, click it and review the material it links to.
Expand Down
22 changes: 14 additions & 8 deletions foundations/installations/installation_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

The first step for building any website is having the right tools. For us, that means setting up a development environment for writing good code.

Many online development courses use in-browser code editors or "sandboxes," which give you the tools and programs needed to accomplish the task at hand and nothing else. You'll use some of these sandboxes throughout the early stages of The Odin Project since they're great for getting started quickly. However, the best way to set yourself up for long-term success is to operate in a real development environment.
Many online development courses use in-browser code editors or "sandboxes," which give you the tools and programs needed to accomplish the task at hand and nothing else. You'll use some of these sandboxes throughout the early stages of The Odin Project since they're great for getting started quickly. However, the best way to set yourself up for long-term success is to operate in a real development environment.

We won't lie to you: installing packages, editors, and even entire operating systems can be very frustrating. However, having the experience of setting up a development environment to run the code you'll write is an invaluable, real-world skill you'll carry with you for the rest of your career.

### The installation plan

In the following sections, we'll go over the steps for setting up your environment. There is no need to install anything in this lesson, this is an informative lesson. These sections are **the most important steps** in the entire curriculum. Please take the extra time to **double check what you're typing** or you may cause more headaches for yourself down the road.
In the following sections, we'll go over the steps for setting up your environment. There is no need to install anything in this lesson, this is an informative lesson. These sections are **the most important steps** in the entire curriculum. Please take the extra time to **double check what you're typing** or you may cause more headaches for yourself down the road.

In the next few lessons, we will walk through these installation steps together:

* Installing a supported [operating system](https://en.wikipedia.org/wiki/Operating_system) (OS).
* Installing Google Chrome web browser.
* Installing a code editor.
* Creating an SSH key (a personal "password" that will identify you to GitHub, Heroku, and many other sites you'll be using).
* Creating an SSH key (a personal "access key" that will identify you to GitHub, Heroku, and many other sites you'll be using).

At the end of the next lesson, you'll be up and running with many of the tools you need to write and run code! It may seem like a lot of steps, but we'll get through it as painlessly as possible together! If anything goes wrong, remember to use these steps:

Expand All @@ -37,16 +37,22 @@ If you're using a Mac, you're in great shape. The Odin Project instructions assu

#### Windows

Windows **is not natively supported** by The Odin Project, or on our Discord server; however, if you're currently using Windows you can use either a virtual machine or dual boot to keep your Windows install while creating your development environment in Linux.
Windows, by itself, **is not natively supported** by The Odin Project, or on our Discord server. Because many of the tools you'll be using were written with a Linux environment in mind, you'll need to have to one even if you plan to use Windows as your development OS. If you are currently using Windows you can use one of the following options to create your development environment:

* A VirtualBox Virtual Machine
* Dual-boot Ubuntu installation
* Windows Subsystem for Linux
Asartea marked this conversation as resolved.
Show resolved Hide resolved

A **virtual machine** is an emulation of a computer that runs within your existing OS. It allows you to use another operating system inside of a program on your current operating system (e.g. Running Linux inside of Windows). Virtual machines are as simple to install as any other program and are risk free. If you don't like Linux, you can easily remove the virtual machine. Virtual machines are a great way for new developers to get started quickly.

- [Watch this video](https://youtu.be/yIVXjl4SwVo) on Virtual Machines to achieve an overview of how they work.
- [Watch this video](https://youtu.be/yIVXjl4SwVo) on Virtual Machines to achieve an overview of how they work.

**Dual-booting** means installing two operating systems on your computer, which can give you the option to boot either Linux or Windows when your computer first starts up. The advantage of dual-booting over a virtual machine is that the OS can use all of your computer's resources, resulting in much faster operation. There is some risk to installing a dual-boot system because you're changing your hard drive partitions, but you'll be okay as long as you take your time and read the instructions.

Dual-booting can be as easy as inserting a flash drive and clicking a few buttons. The benefits of dual-booting cannot be overstated. You will allow Linux to access the full capabilities of your hardware, have a clean and distraction-free environment for coding, and learn the platform used by many senior developers and servers around the world.

**Windows Subsystem for Linux** (usually abbreviated as WSL) lets you run a full-fledged Linux environment from within an existing Windows installation, giving you all of the advantages of Linux without needing to run a virtual machine or dual boot. We'll be using version 2 of WSL, commonly known as WSL2, within the curriculum.
Asartea marked this conversation as resolved.
Show resolved Hide resolved

### Concerned about installing a new OS?

"Woah, woah, woah! I like my OS just fine the way it is!"
Expand All @@ -55,9 +61,9 @@ If you don't have an Apple computer, you are likely using Windows. Don't worry!

Modifying or dual booting a computer to work with the tools you'll need will make it much easier to start programming, can help create a distraction-free environment, and will look good on your resume. Take a deep breath, and let's look at your options.

Still not convinced? Here are a few great reasons to install Linux:
Still not convinced? Here are a few great reasons to install Linux:
ManonLef marked this conversation as resolved.
Show resolved Hide resolved

- **Tested** - We've tested our directions with macOS, Ubuntu, and official Ubuntu flavors. We did the research so that you can get tools installed with as few issues as possible, getting you to coding sooner. Time spent wrestling with your operating system is time taken from learning how to code.
- **Tested** - We've tested our directions with macOS, Ubuntu (and official Ubuntu flavors) and WSL2. We did the research so that you can get tools installed with as few issues as possible, getting you to coding sooner. Time spent wrestling with your operating system is time taken from learning how to code.
- **Community Support** - Using the tools we recommend makes it easier for us to help when you run into trouble.
- **Development Tools Are Built for Linux** - Ruby (on Rails) and Node.js, popular backend technologies covered by The Odin Project and widely used in the larger web development community, are open source projects that explicitly *expect* to run on an open-source (UNIX-based) platform like Linux.
- **Work Like The Pros** - Many developers use a Unix-based operating system.
Expand All @@ -67,7 +73,7 @@ Many learners come to our Discord channel to ask if the directions on this page

Before we can continue, we must first stress one detail of importance:

**We can only support what is provided within the scope of our curriculum. We do not support native Windows or any version of Windows Subsystem for Linux (WSL) as a development environment.** Using Windows and WSL has been discussed many times and it is not feasible to do so at this time. Please do not ask us to support Windows, and please **do not bring it up in the Discord**. We are constantly evaluating our curriculum to keep content as fresh and accessible as possible, and Windows/WSL [has not proven to be a path of low resistance.](https://github.com/microsoft/WSL/issues)
ManonLef marked this conversation as resolved.
Show resolved Hide resolved
**We can only support what is provided within the scope of our curriculum. We do not support native Windows as a development environment.** Using Windows has been discussed many times and it is not feasible to do so at this time. Please do not ask us to support Windows, and please **do not bring it up in the Discord**. We are constantly evaluating our curriculum to keep content as fresh and accessible as possible, and Windows has not proven to be a path of low resistance
Asartea marked this conversation as resolved.
Show resolved Hide resolved

With that out of the way, we need to set up an appropriate development environment!

Expand Down
Loading