David Bindel gave an opening spiel on the club
and its purpose. A page was passed around to collect netids in order to set up
accounts on our local instructional cluster (Totient).
Working with a Unix Shell
Stephen McDowell spoke about the basics of working at the terminal in Unix/Linux
(the environment on Totient, and the default environment for interacting with
many other cloud and HPC resources). The talk was based on slides form a
half-semester course that he taught this spring,
CS 2043.
The below is intended to be a bare-bones minimum in functioning with your Unix
terminal / reference as you get familiar with your terminal.
for cd command, return to previous working directory
# start by navigating to a directory$ cd /usr/local/src
# the command below puts us at /home/sven, same as cd ~$ cd
# the command below puts us back at /usr/local/src$ cd -
# the command below takes us to the parent directory, /usr/local$ cd ..
e.g. head -19 someFile.txt prints the first 19 lines.
tail -[numlines] <filename>
Prints the lastnumlines of the file.
e.g. tail -19 someFile.txt prints the last 19 lines.
Note: if number of lines not specified, default is 10.
The Same and More Information
Working with a Windows Shell
Eric Lee spoke about setting up the terminal for Windows environments. For
convenience, the slides have been inlined below.
Unix for Windows Users
A few of the popular options:
Cygwin/MinGW
Bash for Windows 10
Virtual Machines (VMs)
(Disclaimer, these are just a few of the popular options!)
Cygwin/MinGW
The two most popular Unix-like shells for Windows. Note that this might change
with the aforementioned Bash for Windows 10.
Advantages:
Offers a robust set of GNU/Open Source Tools
Can launch Windows applications directly from shell
Cygwin provides POSIX-like API (mostly). Less so with MinGW
Disadvantages:
Lack of Native Compatibility with Linux Applications
Getting a Linux App to compile takes a nontrivial amount of tinkering
Bash for Windows 10
A “full” Linux Distribution (Ubuntu-based) running inside Windows
Advantages:
Full Compatability with Linux Applications
Shared filesystem —access Windows files through Bash and vice versa
Comes shipped with Windows 10. Older adopters might have to go through some
system updates
Disadvantages:
Quite new (still in “Beta”). As a result, many bugs.
Despite shared filesystem, can’t run Windows software through Bash unlike
Cygwin/MinGW.
While some may point out flaw naturally occurs as Bash for Windows 10 is a
full Linux Distro running inside Windows, it might be unattractive for
users who want a streamlined workflow and might not want to install two
versions of everything.
Virtual Machines (VMs)
VMs are the primary method of running another operating system inside an
existing one. Popular vendors include VirtualBox, VMware. Note that “Containers”
(which are slighly different) are also becoming popular. We’ll discuss them in
the future.
Note that a VM requres a certain subset of your system resources (memory, disk
space, processing power, etc). You choose the size of this subset when you first
create a VM.
Advantages:
Complete Operating System of your choice!
This is a potentially huge upside; you can find a huge number of VM images
online to choose from.
Disadvantages:
File system is not shared; one must set up specific shared folders, leading to
logistical issues when transferring files.
As the VM is an entire OS running on top of your current one, convenient
shortcuts like copy-pasting aren’t possible anymore.
Slow, depending on OS and amount of system resources it receives.