Table of Contents
- 1. Overview
- 2. UMN/CSE Unix Computing Resources
- 3. Linux Environments on Your own machine
See full list on hero.fandom.com. SCP-049 is based on the real-life Plague Doctor, a medical physician who treated victims of the most devastating pandemic of the whole humanity known as the Black Death. SCP-049 is one of the many creations of the Brothers Death. More specifically, he was created by Small Death, who reaps people who died from an illness.
1 Overview
1.1 Rationale
This guide is meant to inform UMN students on options they have toaccess a Unix/Linux environment for course work in computerscience. This applies to courses that use the C programming languagelike CSCI 2021 and CSCI 4061 and may be useful for other courses aswell.
The first section provides information on UMN Unix computing resourcesand some links to tutorials on how to install Unix one personalcomputers. In the latter case, the focus is on the use of VirtualMachines so that a Linux environment can coexist with an existingWindows or Mac OSX installation rather than overwriting these morefamiliar environments.
1.2 Executive Summary
- Have Several Options
- Familiarize yourself with several ways to edit/compile/run code in aUnix environment so that if your primary mechanism fails, you have abackup. Expect your Internet Connection to go down at some pointand have a non-networked solution (Virtual Machine or WSL).
- All Students
- Learn about SSH and SCP to log into remote computers in aterminal. The commands
ssh / scp
are installed by default onalmost all platforms (Windows/Mac/Linux). Read the sections on SSHand SCP for quick introductions. - Windows Users
- You are strongly encouraged to install the Windows Subsystem forLinux (WSL) which provides a an easy-to-set-up, local Unixenvironment largely identical to school machines.
- Mac Users
- You will need to either install a Virtual Machine for edit theircode remotely as Apple no longer supports the tools we use for thisclass running natively.
- Linux Users
- You're already set for the most part as you're using the same OS asyour professor and will reap the benefits thereof.
2 UMN/CSE Unix Computing Resources
The UMN College of Science and Engineering (CSE) provides a wealth ofcomputing resources including several ways to easily access UNIXenvironments.
2.1 Physical Access
CSE Labs provides several physical lab locations many of which haveLinux computers with a Unix environment. Visiting a lab physically andworking on their computers is a plausible way to get work done incourses that require such an environment.
This link lists the lab locations and their usage / hours of operation:
Labs that list 'Ubuntu' have Linux machines as Ubuntu Linux is apopular 'flavor' of Linux.
If you are reading this guide during a PLAGUE make sure to checkwhich labs are open/closed. Plagues tend to limit availability toprevent the spread of disease.
2.2 Vole for Graphical Login: http://vole.cse.umn.edu
CSE Labs provides a slick graphical login to Linux machines through aweb browser via its VOLE system. Navigate to http://vole.cse.umn.edu,enter your login credentials, and initial a graphical login.
A couple observations on Vole
- It is full-ish graphical environment with a 0-cost setup
- Being graphical environment, it can be 'laggy' if your networkconnection isn't fast. Many students notice see this when the systemfails to respond for a short time or a single press of the 'x' keyresults in 'xxxxxxxxxxxxxxxxxxxxxx' showing up on their screen
For these reasons, it is also good to familiar with alternatives toVole described later.
Note: unless you are doing dedicated graphics programming, don't usethe Vole 3D nodes. Use normal Vole. I have received reports that thememory checking program Valgrind can report spurious errors on Vole3Dand should therefore be avoided.
2.3 Graphical Login to Specific Lab Machines
CSE Labs has implemented the same technology used in VOLE to allowgraphical logins to physical lab machines. This can be done byvisiting a web site with the machine name it the title. For example,to get a graphical login to the machines, visit the correspondingURLs:
Machine | URL |
---|---|
csel-kh4250-01 | https://csel-kh4250-01.cselabs.umn.edu |
csel-kh4250-20 | https://csel-kh4250-20.cselabs.umn.edu |
csel-kh1250-05 | https://csel-kh1250-05.cselabs.umn.edu |
… | … |
All machines that can be accessed are in the big list of machines onthe CSE Labs help site.
This method provides only minor advantages over using VOLE. Thetrade-offs are roughly Scripts of the ancients mac os.
- You have to remember the individual machine names rather than just
vole.cselabs.umn.edu
- It is still a graphical environment so you're likely to experiencelag if your network connection is slow
- It is NOT virtualized like VOLE so you get access to the physicalmachine resources but must share them with whoever else is loggedinto the machine
- VOLE automatically assigns you to nodes that have fewer users to getyou somewhat better performance but it is a virtualized environmentso may not be appropriate for all situations
2.4 SSH to CSE Lab Machines
There is a full video course on Learning SSH on LinkedIn Learning,available free through the UMN Library.
CSE Labs allows you to remotely log into a variety of machines usingthe secure shell or SSH for short. For this you will need an SSHtool.
- Mac / Linux: Open a terminal and use the
ssh
command Windows: Open
cmd.exe
and check that thessh
command is presentby typingssh Enter
. Most recent Windows installs have it.If
ssh
is not installed, examine these choices of which PuTTY is aclassic favorite.
SSH connections are non-graphical and therefore are much more robustagainst slow network connections compared to tools like Vole.
To use SSH, you must first know the network address of a machine tolog into. Select a machine name from the big list of machines in CSELabs and log in. My go-to is often
To access apollo
or other machines via SSH on a Unix terminal, type the command below
A login would look something like this:
2.5 Transferring Files To/From Lab Machines
When working on remote machines, it is often necessary to transferfiles between a local (home) computer and the remote (lab) machines.There are a number of graphical tools to do this on all platforms:just use search terms like
- 'secure file transfer on windows'
- 'secure file transfer on mac osx'
and you are likely to find free versions.
Non-graphical tools for file transfer are usually very fast, robust,and easy to use once your learn their quirks.
scp: remote copying on the terminal
If you have access to ssh
in a terminal on your home computer, youvery likely have access to scp
which uses the same secure connectionprotocol but to transfer files rather than set up an interactiveshell. It has a syntax that combines ssh
and the Unix cp
(copy)program. A few examples show common use cases
sshfs and FUSE
Some systems support a way to 'mount' a remote machine filesystemthrough an SSH connection. The net effect of this is that copyingfiles into what looks like a local folder actually transfers them toa remote machine and copying them from that folder transfers from thatmachine. This behavior is often not present by default but isincredibly useful and has saved me countless hours of toil. You caninvestigate these for your system of choice
- Mac OSX FUSE / sshfs: https://osxfuse.github.io/
- SSHFS on Linux: Most Distributions have a package for SSHFS
- Ubuntu: https://help.ubuntu.com/community/SSHFS
- Mint: https://community.linuxmint.com/software/view/sshfs
- Arch Linux: https://wiki.archlinux.org/index.php/SSHFS
- etc.
- Windows: best achieved through the Windows Subsystem for Linux
Once set up, an sshfs
command can be issued to mount a remote folderon an empty local folder. I often use the following command to mountmy home directory on remote machine apollo.cselabs.umn.edu
on alocal directory called apollo
:
2.6 Visual Studio Code and Remote Access
Visual Studio Code (VS Code) has become a popular code editor /Integrated Development Environment (IDE) that many students and staffuse. While our course has no 'official' code editing environment,many staff members are knowledgeable about VS Code and have point toits remote code editing features/plugins as particularly useful forcourses like ours. The capability allows you to edit code on othercomputers as if it were on your local machine. While this capabilityis not unique to VS Code (and is in fact based on SSH), VS Codeprovides a easy and useful means of accessing this ability. Below areseveral sets of instructions on how to do this.
Many students have found this method of accessing school Unix/Linuxenvironments to meet their needs very well.
Official Tutorial from Course Staff: https://tienpdinh.com/posts/remote-vscode
TA Tien Dinh constructed the linked guide to setting up remote editingin VS Code which is comprehensive and has been vetted by the teachingstaff.
Local Guide by a Student
The following information was shared by student Dan Runningen wasreported as very useful by several other students. It hasn't beenvetted by the staff but looks legit and useful.
As long as you have access to your labs account, your credentialsshould work via SSH. Instructions on how to set-up SSH for VSCode canbe found here, however my set-up was a little different.
- You do need to ensure you have an ssh client installed.
You will need the plug-ins below. I believe the first three may bealready installed for you, but 'Remote Development' is theimportant one.
- After installing the plug-ins, you will need to reload the editor.
Open up the 'Remote Explorer' panel.
- Change the drop-down to 'SSH Targets'
- Click the '+' directly underneath to add a new connection.
The window will ask you for your ssh command. You need the fullcommand and be sure to include the
-A
option otherwise theconnection won't complete. Example:This will connect to machine
atlas
. Other possible labcomputers are here.
- Click on the option to save the command in your personal files,not your program files.
- Click the connection and enter your password in the new window.
- This will allow you you work in an interactive IDE through theschool's environment. The connection is faster since all therendering is done client-side and not being transmitted through aweb browser. You also have access to the terminal directly throughthe 'Terminal' menu.
2.7 Physical Access to CSE Labs Machines
You can sit down at a variety of machines managed by CSE Labs whichare listed here: https://cseit.umn.edu/computer-classrooms
Be mindful of the times these labs are open and which labs have Unixmachines listed as Ubuntu 16.04. Keller 4-250 is likely the mostpopular.
3 Linux Environments on Your own machine
It is fun and profitable to set up your own machine to compile codefor the class. While not strictly required, most students find it moreconvenient to compile and run code on their own computer rather thanrelying on remote access to other machines. The following sectionsoutline some options on how to set up a local Unix environment.
3.1 Virtual Machines on Mac or Windows
Running Virtual Machine software allows you to have a 'guest'operating system, likely free Linux, which has separate software fromthe 'host' OS. A great option for this is running VirtualBox on yourHost OS (Windows or Mac) with a Linux distribution as the 'Guest' OS.
In almost all cases, compiling and running code on a Linux VM (virtualmachine) will behave identically to a 'native' Linux.
Below are a list of beginner tutorials on installing VirtualBox and a Linux VM.
- How to Install Linux on Windows or Mac with VirtualBox - BeginnerVideo by IT Career Questions (YouTube)
- ~15min video
- Install Ubuntu Linux for easiest experience, NOT Kali Linux
- No need to make any monetary contributions when downloading anything
- Mac OSX users will need to adjsut their security settings to allowVirtualBox to work, see the guide How to Fix VirtualBox's 'KernelDriver Not Installed (rc=-1908)' Error on a Mac.
- WINDOWS USERS ARE NOT recommended to use Virtualbox, use theWindows Subsystem for Linux instead
- How to set up VirtualBox and Install Ubuntu OS (Mac) by ISOM Suffolk(YouTube)
- ~22min video
- Mac OSX install of Ubuntu Linux Guest
- Mac OSX users will need to adjsut their security settings to allowVirtualBox to work, see the guide How to Fix VirtualBox's 'KernelDriver Not Installed (rc=-1908)' Error on a Mac.
- Create Shared Folder Between Mac OS X and Ubuntu Linux viaVirtualBox by Abanoub Hanna (YouTube)
- ~4min video
- Allows files to be accessed both between both Host (Mac) and Guest(Linux)
- Setup is very short and easy
After installing Linux, you are likely to need some tools. The namesfor these vary but on Ubuntu they are usually as follows
build-essential
: compiler toolchain based ongcc
valgrind
: memory checkergdb
: debugger
Cached
Usually performing the following command in an Ubuntu Linux terminalwill update the package lists and install all of these:
3.2 Windows Specific Options
While Windows does not have Unix tools by default, Windows 10 supportsthe very nice Windows Subsystem for Linux on Windows 10. This allowsa Linux system to be installed with very little effort complete withcompiler and debugging tools.
- Install a flavor of Linux such as Ubuntu (Video Tutorial, highly recommended)
- Start a linux command line via the
bash
program - Follow the Linux installation instructions appropriate to the distro(see Linux/Unix instructions)
After installing Linux, you are likely to need some tools. The namesfor these vary but on Ubuntu they are usually as follows
build-essential
: compiler toolchain based ongcc
valgrind
: memory checkergdb
: debugger
Wayfarers demo mac os. Usually performing the following command will update the packagelists and install all of these:
NOTE: Assembly produced by gcc
will target the Windows architectureand is not likely to work on lab Linux machines where we willgrade. Make sure to verify your code works in those environments aswell.
NOTE: Older options for getting a Unix environment include Cygwin andMinGW but these are discouraged as they will not be fully compatiblewith the tools used in the course.
3.3 Mac OSX
Unfortunately, Mac OSX no longer has good support for the tools usedin this course.
To get a local working environment, Mac OSX users are encouraged toinstall a virtual machine software like Virtual Box and UbuntuLinux. The earlier section on Virtual Machines gives some tutorialson how to perform the install.
Historically Mac OSX had better support for native Unix developmentbut changes over the last few years to the default configuration ofOSX has made it unlikely to be able to work use tools that are centralthe course. These are as follows.
gcc
: Most OSX installations come with a command calledgcc
BUTit is not actually the GNU Compiler Collection. It is usually theCLANG compiler. This is not compatible with our tools and it is notstraightforward to get a real GCC installed.gdb
: A learning goal for this course is to understand the basicutility of debuggers. We will focus ongdb
. Unfortunately OSX doesnot come with this tool by default and installing it is a HUGEheadache.valgrind
: Testing C programs is not easy and the Valgrind memorychecker makes it a lot easier. However, the most recent versions ofOSX are not compatible with this tool. This is regrettable andthere is no known solution at this time.- Assembly produced by any compiler on Macs will target the OSXarchitecture and is not likely to work on lab Linux machines wherewe will grade. This can lead to loss of credit.
3.4 Native Linux
Linux is a Unix-like OS. Installing Linux naively on your own computeris NOT required but can be quite useful. For those new to Linux, goodbeginner distributions (flavors) of Linux include.
Scp 049 Cell
The site DistroWatch maintains an up-to-date list of popular Linuxdistributions and various properties of them.
4 Basic Navigation in a Unix Terminal
On logging into the machine you will work on, you will need to makesure that you get the codepack linked at the top associated with thelab and unzip it which will create a directory called lab01-code
with C files for you to analyze. To compile and run these, open aterminal and navigate to the directory lab01-code
. This is usuallydone by issuing a series of 'change directory' or cd
commands as inthe following brief demo.
If you are inexperienced working with a terminal (also called commandline or shell), then the following tutorial should give you the basicsto get through most of the course.
You might also examine some videos on Learning the Linux Command Lineand Learning SSH as this is helpful for this and LOTS of othercourses. These videos are available through LinkedIn Learning which isfree for UMN students to access through the University Librarysystem.
5 CHANGELOG:
- Fri Jan 22 11:23:34 AM CST 2021
- Added
apt update
andunzip
packages to the recommended packages for Linux/WSL installs. - Thu Jan 14 02:52:22 PM CST 2021
- Added an executive summary andupdated some links to reflect Spring 2021.
- Thu Sep 3 11:05:11 AM CDT 2020
- Updates to the Virtual Machinesection to apprise Mac OSX users to a common security setting thatmust be changed to make Virtualbox work.
- Fri 28 Aug 2020 11:52:13 AM CDT
- Updated instructions onVS Code to remotely edit CSE lab machines code to includeofficial staff-produced guide.
- Mon 24 Aug 2020 09:30:15 AM CDT
- Added graphical access to CSE Labmachines through the web via vole-like technology.
- Mon 03 Aug 2020 02:52:31 PM CDT
- Added overview of using VS Codeto remotely edit CSE lab machines code.
- Tue 07 Jul 2020 11:12:03 PM CDT
- Added some information ontransferring files via
scp
andsshfs
along with someadditional notes on the CSE Labs Vole system.