\(\def\dt{\Delta t}\)
\(\newcommand{\transpose}[0]{^\mathrm{T}}\)
\(\newcommand{\half}[0]{\tfrac{1}{2}}\)
\(\newcommand{\Half}[0]{\frac{1}{2}}\)
\(\newcommand{\norm}[1]{\left\lVert#1\right\rVert}\)
\(\newcommand\given[1][]{\:#1\vert\:}\)
UP | HOME

Command Line Exercises

Table of Contents

1 Introduction

The Northwestern IT Research Computing Services group has put together a great set of command line exercises and a guided tour through some basic command line manipulations in Bash (based on some Software Carpentry lessons) . After our interactive Linux intro, if you feel like you'd benefit from some exercises this is my recommended next step.

Their README file contains high level descriptions of how to complete the exercises, but I'll provide a bit more detailed guides below. Also note that the README contains links to many other excellent Linux and Bash resources. They also have a PowerPoint presentation that is pretty easy to follow.

2 Software Carpentry

The steps for following this Software Carpentry guided tour are located here. Most of the steps that you follow assume that you have downloaded and extracted a sample set of files, and that you are starting in a particular current working directory. So to ensure you are starting from the right setup, I've provided an annotated set of instructions below:

# change directory to your home directory:
cd
# download the zip archive containing the example files that you are going to be
# working with:
wget https://github.com/nuitrcs/commandlineworkshop/blob/master/shell-novice-data.zip?raw=true -O shell-novice-data.zip
# verify you properly downloaded the file:
ls ~/shell-novice-data.zip
# if above command doesn't print anything, then you haven't properly
# downloaded the file. You could try going directly to the GitHub page and
# clicking download button: https://github.com/nuitrcs/commandlineworkshop/blob/master/shell-novice-data.zip

# now we extract the zip archive:
unzip ~/shell-novice-data.zip
# now we can change directory into the base directory of the extracted files:
cd data-shell
# You should be ready to follow the steps. so, if you look at the very first
# step in the guided tour, they have you type "ls molecules" and "cd molecules".
# Both of these commands should work if your are in the "~/data-shell/"
# directory.

3 Exercises

There really isn't any setup required for their command line exercises. Simply follow this link and complete the exercises described. If you'd like to check your answers, they have also provided an answer sheet.

Note that in Section II they have you work with /usr/lib64. That isn't a great directory to work with in 18.04 because there are very few .so files in that directory. I'd instead recommend using /lib/x86_64-linux-gnu.

Creative Commons License
ME 495: Embedded Systems in Robotics by Jarvis Schultz is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.