Opening a terminal

Overview:

  • Teaching: 5 min
  • Exercises: 0 min

Questions

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

Objectives

  • Clone the library for use in this workshop
  • Launch the library and open a terminal on notebooks
  • Explain how putty/kitty/ssh allows you to login to remote machines.
  • Explain how to login to ‘linux.bath.ac.uk’ from University computers.
  • Explain that we use Xming in case we want to forward graphics.

This episode details how to get started on the Jupyterhub (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 launching a library on notebooks.

Getting Started

First we need to log-on to the server: https://rss.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 linux link and follow the instructions to set up material for this course.

Click on the new button and select terminal to luanch the terminalLinux session which we will use through the rest of the lesson. This should open a new tab that looks like:

terminal

You are now ready to start the lesson. Details of accessing the University service that run linux are below, it is useful to know as other courses may use it and if your research requires High Peformance Computing you will likely need to use a range of machines so it is useful to know how to access them.

Explore in safety

One of the benefits of using the server for this course is that any mistakes we might make won't damage any of our existing files on our Pcs or University systems.

Aside

Let's try logging on to the University linux service. If you are running on your own computer you can visit our guide on how to login. Log-in to linux.bath.ac.uk with you University username and password as detailed in the guide.

If you are using a University PC go to:

  • ‘Start’ → All Programs → Xming → linux

This launches a program called ‘Kitty’ which will try to connect to the linux service. A window should open which looks like:

linux-login

Type your user name and you should be prompted for a password:

linux-password

Passwords in linux

When you type your password no ‘*s’ will appear. This is not a mistake, in linux the password typically remains hidden.

Think why this might improve security.

If you have successfully logged on, the window should now look something like this:

linux-success

You should be able to see your username followed by @linux or similar. On linux.bath this is the name of the machine that you have logged onto. Since a number of machines make up the service what you see may be slightly different.

Kitty is a derivative of another tool Putty which can has similar functionality, both use a service called ssh to connect to the linux service. This may be referred to as a shell, terminal, command line session. We use Xming since this also allows grapchics to be forwarded over the ssh connection, but this may not form part of your course.

Key Points:

  • Jupyter notebooks are a really useful platform for exploring code and sharing reproducible research
  • We use them because they are a convenient platform for delivery training and have a Linux terminal
  • The University runs the ‘linux.bath’ service to provide a general use Linux machine
  • ‘linux.bath’ provides certain academic software for students and staff
  • The service is a shared machine designed for lightweight use
  • For heavy workloads you should investigate using the Unviersity’s HPC service