This page provides some basic instructions for using the command line interface on Linux computers in CSIL, the Computing Science Instructional Labs at SFU, followed by a set of links to books and sites with more extensive tutorials. As they vary in detail, method and approach, try another one if the first one you try is not a good fit for you at this time. Suggestions and corrections are welcome (email us).  This page is aimed at new Linux users. CMPT 127 students may be particularly interested.

We assume:

  • you are a computer user; likely your computer runs Windows or macOS
  • you can use a keyboard (two finger typists ok!) and a mouse
  • you have at least a vague idea about folders and files

What Am I Doing? What is Going On?

You are learning a different way to interact with a computer, working at the command line. It means typing commands at a prompt - no mouse. Typing only!  Why?

  • it is often faster to do a task with a typed command + the enter key than navigating menus to perform that task
  • you get a clearer understanding of what is going on behind the integrated development environment (IDE) you are likely to use in future courses and jobs
  • it allows you to access and do work on a Linux computer from somewhere else; with remote access you may not have the graphical user interface (GUI), or it may malfunction. SFU CSIL has Linux servers you can log on to remotely and do your CMPT 127 work at the prompt.
  • you can combine Linux commands on a single command line in powerful and efficient ways

What is Linux - what is an operating system for that matter?

Most computers need to run an "operating system" or OS to be usable. An OS is a computer program that performs tasks like running other programs (word processors, web browsers, C compilers...), opening and reading or writing files to storage, managing communication with other computers over a network, getting your input of mouse actions and typing to the program they are meant for, and getting the output of that program where it is supposed to go.

Linux is an operating system, Microsoft's Windows is an operating system, Apple's OS X is an operating system. They all have many fans and haters but given all the computer users who aren't in CS - clearly you don't need to know much about operating systems to use a computer, and the same goes for doing CMPT 127. You will learn more about them in CMPT 300!

Many kinds of Linux are available, called distributions or distros, which also each have many fans and haters. SFU CSIL uses a popular one called Ubuntu, but basic command line work is nearly the same in all distros.

Step 1: Log on, get that command line prompt

If you are an SFU CS student, you can log on with your campus userid and password to a Linux workstation in CSIL Burnaby or Surrey.  You need fob access to enter CSIL.  We describe three ways to access CSIL Linux for practice or school work:

  • log on at a Linux workstation, or ...
  • ssh to a CSIL Linux server from CSIL Windows, or ...
  • log on to a CSIL Linux server from your Windows or Mac computer.

Get a Linux command line from a CSIL Linux workstation:
Once you are logged on, "Applications" and "Places" will be in the upper left of the screen.  Use the mouse to get a terminal window with the prompt.  Click the image for a close up if it helps:

1. Click on Applications to see its drop down menu...
2. ... on that menu click on Utilities to get a side menu...
3. ... scroll down on the side menu to "Terminal" and click on that.

 

A terminal window opens, a prompt is displayed. Use the mouse to grow the terminal window a bit:


Get a Linux command line from a CSIL Windows workstation:
coming soon


Get a Linux command line from a non-CSIL computer:
coming soon


Now you can move on to one of the following Linux learning resources:


Extra resources for further study
 


Last update: 2021.11.17