W#1 Introduction to the Command Line

Wednesday 10 April 2019

Workshop Stream – The Navigator

What is it: This session will cover key concepts for using the ‘Bash’ command line, how to connect to a remote server, how to download code from GitHub, and some useful troubleshooting tools and disaster-avoidance techniques for when things, inevitably, go wrong. Learn how to control your computer from the command line, why it’s important, and what those ‘helpful’ Stack Overflow people mean when they say you “simply need to make sure /usr/bin is in your $PATH and you won’t need to sudo”.

Who is it for: This session is suitable for anyone who is interested in running software from a command line (e.g. Pandoc, Git, Homebrew) and/or maintaining software on a server (e.g. self-managed web applications, Twitter bots, Python scripts etc).

Presenter: Hugh Rundle (CAVAL)

Hugh Rundle is the Secretary and co-founder of newCardigan, a VALA Committee member and former Systems Librarian. He currently works at CAVAL as Manager, Member Services – supporting academic library interest groups and professional development. A self-taught and frequently incompetent amateur system administrator, Hugh has learned server maintenance, Bash syntax and shell scripting the hard way. In his spare time he looks after newCardigan’s website and database, runs the Aus GLAM Blogs service and ausglam.space Mastodon server, and keeps a decreasing number of Twitter bots alive. He hopes to teach you how to avoid some of his past mistakes.

Twitter: @hughrundle ; Mastodon: @hugh@ausglam.space ; Blog: www.hughrundle.net

Workshop Requirements

Participants will require a WiFi-enabled laptop (tablets or similar will not be sufficient); a full working installation of Bash; and a few standard applications that usually come bundled with Bash. What you need to do will depend on your laptop.


In the unlikely event that you are already using a Linux computer, you will have Bash installed and don’t need to do anything.


You will have everything you need, as long as you can open the Terminal application. This is found under Utilities. You will be able to follow most of the workshop without Administrator privileges, but it is better if you do have them. Ask your IT support if unsure: generally if the computer allows you to install software applications yourself you’ll be ok.


You will need to install Bash using either of the following techniques. Both require Administrator privileges – you may need assistance from your IT department if using a work laptop, so ensure you have successfully installed Bash before Tech Camp starts.

Installing Ubuntu Linux on Windows 10

As strange as it sounds, Windows 10 allows you to install Linux as an application. This will give you access to a fully functional Bash installation.

1. Open Windows Settings
2. Click Apps
3. Go to Apps and Features
4. Click on Programs and Features under Related Settings
5. Click Turn Windows Features on or off on the lefthand side of the screen
6. Scroll down to Windows Subsystem for Linux and tick the box
7. Click Ok

Windows will process some tasks and then ask you to restart your laptop.

8. Restart your laptop
9. Search the App Store for ‘Ubuntu 18.04 LTS’
10. Click install and wait for Ubuntu to download and install
11. Once installed, click the blue Launch button. A window will pop up telling you it is installing Ubuntu and it may take a few minutes.
12. When installed, Ubuntu will ask you to Enter a new UNIX username.
13. Enter a password – and write it down somewhere. You’ll need this.

Installing Cygwin on Windows

If you are running Windows 8 or lower, you should install Cygwin.

1. Go to https://www.cygwin.com
2. Scroll down to Installing Cygwin
3. Click setup-x86_64.exe if you have a 64-bit Windows or setup-x86.exe if you have 32-bit Windows. If you don’t know which one you are using:

* Windows 10 and Windows 8.1
Select the Start button, then select Settings > System > About.
At the right, under Device specifications, see System type.

* Windows 7
Select the Start button The Start button, right-click Computer, and then select Properties.
Under System, see the system type.

4. Click Save File
5. Go to Downloads or wherever your downloaded files go to (possibly the Desktop), and double-click the .exe file you just downloaded (setup-x86_64.exe or setup-x86.exe)
6. Follow the prompts in the download program:

* Install from Internet
* Install for all users in the default location
* Change the Local Package Directory to somewhere logical like C:\Users\your_user_name\cygwin
* Use system proxy settings to connect to the Internet
* Select a download mirror – probably http://mirror.internode.on.net or http://ucmirror.canterbury.ac.nz are the best bet
* Select all packages (i.e. accept the default)
* Confirm
* Click Finish