CS 149: Introduction to Programming
James Madison University, Fall 2018 Semester

Lab02: Unix tutorial for beginners

Background

The PCs in ISAT/CS 143 and ISAT/CS 250 run Linux Mint, and the iMacs in ISAT/CS 248 used to run macOS. Both operating systems are based on Unix and come with a powerful suite of general purpose computing tools. Many of these tools are only available via the command-line interface (also known as the "Terminal"). You will learn some of these commands in this course and others throughout your career. Today we will focus on the basic survival skills for navigating the command line and a Unix-based file system.

Part 0: Getting Started

There are multiple options for completing this lab: (1) use a Linux machine in the CS department, (2) connect to the student server using SSH or PuTTY, or (3) get things working on your own computer. We recommend (1) if you are starting this in class, but then also recommend completing the last option, since it will enable you to be more productive throughout the course.

Part 1: Video Tutorial

Once you have a Terminal running, watch the video below and follow along on your own computer by typing the same commands. Pay attention to how the video demonstrates tab-completion. The up/down arrows and the tab key are your best friends when working on the command line!

Part 2: Online Tutorial

Work through the first four parts of UNIX Tutorial for Beginners. The first part is more or less a review of the video. The fifth part is optional.

Download the Lab02.txt worksheet (right-click, Save link as..., navigate to CS149/Lab02) and answer the questions. Open the file using a text editor (e.g., gedit on Linux, TextWrangler on macOS, Notepad++ on Windows).

Make sure you save this file as plain text; if you use Word or LibreOffice, you'll need to "Save as" and change the type to "Plain Text". And please do NOT change the name of the file; Canvas automatically appends your first and last name to the file when I download the submissions for grading.

Upload your completed worksheet to Canvas by the end of the day. If you have questions, feel free to start a discussion on Piazza.