Set up your computer
In this workshop series, we will be the ARDC Nectar Research Cloud. Each participant will be assigned a separate virtual machine (VM) that will have all the prerequisite software already installed.
The main requirements for this workshop are a personal computer with:
- Visual Studio Code (VS Code)
- A web browser
Below, you will find instructions on how to set up VS Code on your computer and how to connect to Nectar. Each participant will be provided with an IP address to their VM at the beginning of the workshop, which will be used to connect to the machine via VS Code.
Install and set up Visual Studio Code
Visual Studio Code (VS Code) is a lightweight and powerful source code editor available for Windows, macOS and Linux computers.
-
Download Visual Studio Code for your system from here and follow the instructions for:
-
Open the VS Code application on your computer

-
Click on the extensions button (four blocks) on the left side bar.
-
Search for and install the "Remote - SSH" extension. Click on the blue
installbutton.

Login via Visual Studio Code
To connect to your VM within VS Code, you first need to add the login details to an SSH config file on your computer. You can do this within VS Code as follows:
- Find and copy the IP address for your Nectar VM that you were provided with.
- In VS Code, use the keyobard shortcut
Ctrl + Shift + P(Windows/Linux) orCmd + Shift + P(MacOS) to open the command palette. - Select
Select Remote-SSH: Add New SSH Host... - In the text box that appears, type
ssh <USERNAME>@<ip_address>, substituting your provided username and IP address.- For example, if your username is
meand your IP address is130.56.245.40, you would typessh me@130.56.245.40
- For example, if your username is
- Press
Enterto submit the SSH command. - In the drop-down box, select an SSH configuration file to update.
- Typically, you will want to update the configuration file that is in
${HOME}/.ssh/config, which will usually be the first one in the list.
- Typically, you will want to update the configuration file that is in
- You should get a pop-up message saying "Host added!" in the VS Code window.
Now you are ready to connect to the VM via VS Code. To do so:
- Open the command palette again (
Ctrl + Shift + P/Cmd + Shift + P) and selectRemote-SSH: Connect Current Window to Host... - In the drop-down box, select the newly-added remote, which should be at the top of the list and should be labelled with your VM's IP address.
- Type in your provided password and press enter.
Having successfully logged in, you should see a small blue or green box in the bottom left corner of your screen:

Install extensions on the remote machine
We will now install some helpful VS Code extensions. The "Nextflow" extension adds Nextflow-specific syntax highlighting. The "Live Server" extension enables us to view HTML reports on the remote machine without having to download them first.
- Ensure you are still connected to the VM as above.
- Click on the extensions button (four blocks) on the left side bar.
- Search for and install the "Live Server" extension. Click on the blue
installbutton.

- Search for and install the "Nextflow" extension. Click on the blue
installbutton.

Install the code command on the remote machine
VS Code has a handy command-line tool called code that you can run to open any file or folder within VS Code. To install it:
- Open the command palette (
Ctrl + Shift + P/Cmd + Shift + P) and search for "Shell Command: Install 'code' command in PATH". When you find the command, click on it to begin the installation. - Close any active terminals within VS Code and start a new one for the changes to take effect.
Open the workshop folder
The last thing to do is to navigate to the workshop folder:
- Go to the File Explorer view in the left-hand side bar, or press
Ctrl + Shift + E(Windows/Linux) orCmd + Shift + E(Mac) if it isn't visible. - Click the blue "Open Folder" button.
- Select or type
/home/<USERNAME>to open the $HOME folder in your VM (replace<USERNAME>with your assigned user name). - If prompted, select the box for
Trust the authors of all files in the parent folder ‘home’then clickYes, I trust the authors - To open a terminal, type
Ctrl + J(Windows) orCmd + J(MacOS)- TIP: You can also use
Ctrl + ~(all systems) to open a terminal, andCtrl + Shift + ~to open additional terminal tabs, which show up in a panel on the right-hand side of the terminal view.
- TIP: You can also use
Tips for using VS Code
| Shortcut | Windows/Linux | MacOS |
|---|---|---|
| Show command palette | Ctrl + Shift + P |
Cmd + Shift + P |
| Toggle sidebar | Ctrl + B |
Cmd + B |
| Open new window | Ctrl + Shift + N |
Cmd + Shift + N |
| Open new file | Ctrl + N |
Cmd + N |
| Open existing file/folder | Ctrl + O |
Cmd + O |
| Open/close terminal | Ctrl + J |
Cmd + J |
| Open/close terminal (alternative) | Ctrl + ~ |
Ctrl + ~ |
| Open additional terminal | Ctrl + Shift + ~ |
Ctrl + Shift + ~ |
| Next file or terminal tab | Ctrl + PageDown |
Cmd + Shift + ] |
| Previous file or terminal tab | Ctrl + PageUp |
Cmd + Shift + [ |
| Quick file open | Ctrl + P |
Cmd + P |
| Zoom in | Ctrl + |
Cmd + |
| Zoom out | Ctrl - |
Cmd - |
| Find | Ctrl + F |
Cmd + F |
| Save | Ctrl + S |
Cmd + S |
| Select current line | Ctrl + L |
Cmd + L |
| Edit every instance of highlighted string | Ctrl + Shift + L |
Cmd + Shift + L |