You need to download some files to follow this lesson.
- Download data-shell-scripting.zip and move the file to your Desktop.
- Unzip/extract the file.
Let your instructor know if you need help with this step.
You should end up with a new folder called
data-shell-scripting
on your Desktop. - Open a terminal. If you’re not sure how to open a terminal in your operating system, see the instructions below.
- In the terminal type
cd
then press the Return key. This step will make sure you start with your home folder as your working directory.
In the lesson, you will find out how to access the data files in this folder.
Where to type commands: How to open a new shell
The shell is a program that enables us to send commands to the computer and receive output. It is also referred to as the terminal or command line.
Some computers include a default Unix Shell program. The steps below describe some methods for identifying and opening a Unix Shell program if you already have one installed. There are also options for identifying and downloading a Unix Shell program, a Linux/UNIX emulator, or a program to access a Unix Shell on a server.
If none of the options below address your circumstances, try an online search for: Unix shell [your computer model] [your operating system].
We’re currently trialing providing the course via JupyterHub.
You will need to connect to the Cardiff University VPN service in order to access the JupyterHub website. Please follow this link for more information:
https://intranet.cardiff.ac.uk/staff/supporting-your-work/it-support/wireless-and-remote-access/off-campus-access/virtual-private-network-vpn
You can access the service at: https://host234.sparrow.cf.ac.uk
You will be presented with a warning when accessing the service as we are currently using self-signed security certificates. Please do not be alarmed and click to accept the risk in your browser.
Once you’ve logged in, please click on the “Terminal” button on the page to access a terminal environment you can use to run the commands featured in this course. The course material and the data-shell.zip file have already been added to the envrionement as wel and are available in the desktop folder.
Accounts
Please use the following accounts to access the service. We’ll provide the password during the sessions.
- training1 through to training20
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. If you are attending a Software Carpentry workshop session, it is likely you have already received instructions on how to install Git for Windows.
Once installed, you can open a terminal by running the program Git Bash from the Windows start menu.
Other solutions are available for running Bash commands on Windows. There is now a Bash shell command-line tool available for Windows 10. Additionally, you can run Bash commands on a remote computer or server that already has a Unix Shell, from your Windows machine. This can usually be done through a Secure Shell (SSH) client. One such client available for free for Windows computers is PuTTY. See the reference below for information on installing and using PuTTY, using the Windows 10 command-line tool, or installing and using a Unix/Linux emulator.
Reference
- Git for Windows - Recommended
For advanced users, you may choose one of the following alternatives:
- Install the Windows Subsystem for Linux
- Using a Unix/Linux emulator (Cygwin) or Secure Shell (SSH) client (Putty)
Please note that commands in the Windows Subsystem for Linux (WSL) or Cygwin may differ slightly from those shown in the lesson or presented in the workshop.
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
.
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
.