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

Update installation section #207

Merged
merged 6 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 23 additions & 19 deletions src/install.rst
victorlin marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -39,50 +39,54 @@ Install Nextstrain CLI

.. group-tab:: macOS

In a Terminal, run:
1. Open a Terminal. You can do so by searching for ``terminal`` in Spotlight (search icon in the menu bar) and opening :guilabel:`Terminal.app`.

.. code-block:: bash
2. Install Nextstrain CLI:

curl -fsSL --proto '=https' https://nextstrain.org/cli/installer/mac | bash
.. code-block:: bash

You can launch a Terminal by clicking the Launchpad icon in the Dock, typing ``terminal`` in the search field, and clicking Terminal.
curl -fsSL --proto '=https' https://nextstrain.org/cli/installer/mac | bash


.. group-tab:: Windows (WSL)

`Install Windows Subsystem for Linux (WSL) 2 <https://docs.microsoft.com/en-us/windows/wsl/install>`_.
You may have to restart your machine when configuring WSL.
1. `Install Windows Subsystem for Linux (WSL) 2 <https://docs.microsoft.com/en-us/windows/wsl/install>`_. You may have to restart your machine when configuring WSL.

2. Open a WSL terminal. You can do this by searching for ``wsl`` in the Start menu and opening :guilabel:`wsl: Run command`.

In a WSL terminal, run:
3. Install Nextstrain CLI:

.. code-block:: bash
.. code-block:: bash

curl -fsSL --proto '=https' https://nextstrain.org/cli/installer/linux | bash
curl -fsSL --proto '=https' https://nextstrain.org/cli/installer/linux | bash

You can launch a WSL terminal by clicking the Start menu, typing ``wsl``, and pressing enter.
.. note::

If you run into errors such as ``curl: not found``, this may be because Ubuntu is not set as the default Linux distribution. To fix this, run ``wsl --set-default Ubuntu`` in a Command Prompt terminal (not WSL), then open WSL.


.. group-tab:: Windows (PowerShell)

In a PowerShell terminal, run:
1. Open a PowerShell terminal. You do so by searching for ``powershell`` in the Start menu and opening :guilabel:`Windows PowerShell: App`.

**Do not** run as Administrator.

.. code-block:: powershell
2. Install Nextstrain CLI:

Invoke-RestMethod https://nextstrain.org/cli/installer/windows | Invoke-Expression
.. code-block:: powershell

You can launch a PowerShell terminal by clicking the Start menu, typing ``powershell``, and pressing enter.
Make sure to choose the item that is **not** marked "(Adminstrator)".
Invoke-RestMethod https://nextstrain.org/cli/installer/windows | Invoke-Expression


.. group-tab:: Ubuntu Linux

In a terminal, run:
1. Open a terminal. You can do so by clicking the "Show applications" icon in the Dock, typing ``terminal`` in the search field, and clicking :guilabel:`Terminal`.

.. code-block:: bash
2. Install Nextstrain CLI:

curl -fsSL --proto '=https' https://nextstrain.org/cli/installer/linux | bash
.. code-block:: bash

You can launch a terminal by clicking the "Show applications" icon in the Dock, typing ``terminal`` in the search field, and clicking Terminal.
curl -fsSL --proto '=https' https://nextstrain.org/cli/installer/linux | bash


Make sure to follow the installer's final instructions to setup your shell config.
Expand Down
12 changes: 7 additions & 5 deletions src/snippets/wsl-home-dir.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
.. admonition:: For Windows (WSL) installs
:class: hint

By default, your Windows home directory will not be directly accessible under your WSL home directory. When run in a WSL prompt, the following command fixes that by creating a symlink to it in your WSL home directory. This allows you to use Windows-based text editors and Linux commands all on the same files.
You will have two home directories: one for Windows and one for WSL. You can run commands and edit files in either directory, but note the difference in paths when working on Windows vs. WSL.

.. code-block:: bash
1. Windows home directory

ln -ws "$(wslpath "$(wslvar USERPROFILE)")" ~/windows_home
- Windows path: ``C:\Users\<user>\``
- WSL path: ``/mnt/c/Users/<user>/``

Optionally, you can customize the ``windows_home`` folder name or only link to a specific directory under your windows user (e.g. ``ln -ws "$(wslpath "$(wslvar USERPROFILE)")/Documents" ~/windows_documents``).
2. WSL home directory

If the command does not work, you may have to first run ``sudo apt install wslu``.
- Windows path: ``\\wsl$\Ubuntu\home\<user>\``
- WSL path: ``/home/<user>/`` or ``~``
Loading