Getting Set-Up

Overview:

  • Teaching: 5 min
  • Exercises: 0 min

Questions

  • Where can I run the shell?
  • What are Jupyterhub and notebooks?

Objectives

  • Log onto the JupyterHub Server for the lesson
  • Open a terminal on the Server
  • Copy the files necessary for this lesson

This episode details how to get started on the Jupyterhub Server (normally used for notebooks) and accessing the terminal. This service runs a common Linux operating system with similar appearance to that found on MacOs and HPC services. You can access this service from any PC or laptop by in your web browser.

Getting Started

First we need to log-on to the server: https://astro.jupyterhub.bath.ac.uk, you should be redirected to use your University account via the Microsoft web login. This should start a jupyterhub service running on the server and return you to a page that looks like:

Create new notebook

You should have a number of files in your home folder. Click on Welcome.ipynb to find out more about this service. Click on the Intro to the shell link and follow the instructions to set up material for this course.

Opening a Terminal

From the JupyterHub server homepage click the New dropdown button and select Terminal. Open new terminal

This should open a terminal session in a fresh window for you:

New terminal

Opening a shell on your system

You can of course open a terminal on your own system, rather than the remote JupyterHub server.

Windows:

Computers with Windows operating systems do not automatically have a Unix Shell program installed. In this lesson, we encourage you to use an emulator included in Git for Windows, which gives you access to both Bash shell commands and Git.

Once installed, you can open a terminal by running the program Git Bash from the Windows start menu.

For advanced users:

As an alternative to Git for Windows you may wish to Install the Windows Subsystem for Linux which gives access to a Bash shell command-line tool in Windows 10.

Please note that commands in the Windows Subsystem for Linux (WSL) may differ slightly from those shown in the lesson or presented in the workshop.

macOS:

For a Mac computer running macOS Mojave or earlier releases, the default Unix Shell is Bash. For a Mac computer running macOS Catalina or later releases, the default Unix Shell is Zsh. Your default shell is available via the Terminal program within your Utilities folder.

To open Terminal, try one or both of the following:

In Finder, select the Go menu, then select Utilities. Locate Terminal in the Utilities folder and open it. Use the Mac ‘Spotlight’ computer search function. Search for: Terminal and press Return. To check if your machine is set up to use something other than Bash, type echo $SHELL in your terminal window.

If your machine is set up to use something other than Bash, you can run it by opening a terminal and typing bash.

How to Use Terminal on a Mac

Linux:

The default Unix Shell for Linux operating systems is usually Bash. On most versions of Linux, it is accessible by running the Gnome Terminal or KDE Konsole or xterm, which can be found via the applications menu or the search bar. If your machine is set up to use something other than Bash, you can run it by opening a terminal and typing bash.

Key Points:

  • You should now be logged into the JupyterHub server, with a terminal open and have copied the course material for the course over.