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 please). 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 - the School
provides
CSIL CPU servers. please note:
you may not have the graphical user interface (GUI), or it may malfunction.
-
you can combine multiple 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 computing science - clearly you don't need to know much about operating systems to use a computer, and the same goes for taking CMPT 127. You will learn more about them in CMPT 300!
Many kinds of Linux are available, called distributions or distros; which also each has many fans and haters. CSIL uses a popular Linux distro called Ubuntu, but the basic command line work is nearly the same in all distros.
Step 1: Login, get that command line prompt
If you are an SFU Computing Science student, you can login with your SFU Computing ID (aka campus userid) and password to a Linux workstation in CSIL Burnaby or Surrey. You need card access to enter CSIL. We describe three ways to access CSIL Linux systems for practice and/or course work:
- login at a CSIL workstation running Linux, or ...
- ssh into a CSIL Linux CPU server from CSIL Windows, or ...
- login to a CSIL Linux CPU server from your personal Windows or Mac computer.
A terminal window opens, a prompt is displayed. Use the mouse to grow the terminal window a bit:
Now, you can start typing in your Linux commands.
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 these extra resources for further study: