Difference between revisions of "EGR 103/Fall 2018/Lab 1"

From PrattWiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page will go through the abbreviated, virtual version of Lab 1 since...snow...
+
This page will go through the abbreviated, virtual version of Lab 1.
  
 
== Introduction ==
 
== Introduction ==
Lab 1 is an introduction to Duke's UNIX system as well as to writing lab reports in LaTeX.  Because of the school closing during the first lab, the parts of the lab that can be moved to a future week without impacting the progress of the course have been moved.  However, it is important in this first week to learn how to work on lab assignments, how to maneuver a bit in UNIX, and how to start documenting your work in LaTeX.  You should be able to follow along with this guide.  Here's what you should accomplish by the end:
+
Lab 1 is an introduction to Duke's UNIX system as well as to writing lab reports in LaTeX.   
* Download, install, and use a terminal program on your own computer or on a public Duke machine.  For Windows folks this will be [[MobaXterm]] and for Mac folks it will be [[XQuartz]]
+
=== In Lab ===
 +
Here's what we will do together in lab for this week:
 +
* Log in to a lab computer
 +
* Use [[MobaXterm]] to connect to login.oit.duke.edu
 
* Connect to Duke's UNIX system and look at the space that has been created for you
 
* Connect to Duke's UNIX system and look at the space that has been created for you
 
* Create a folder for the course in your home directory and create a folder for the first lab in your course folder
 
* Create a folder for the course in your home directory and create a folder for the first lab in your course folder
Line 13: Line 16:
 
* Use evince to view the finished document
 
* Use evince to view the finished document
 
* Understand the basic troubleshooting techniques for LaTeX documents.
 
* Understand the basic troubleshooting techniques for LaTeX documents.
 +
=== Out of Lab ===
 +
On your own, to get work done, you will need to:
 +
* Log in to a computer.
 +
* Use a terminal program: 
 +
** If you are on a Duke public machine running Windows, [[MobaXterm]] is installed.
 +
** If you are on a Duke public machine running MacOS, [[XQuartz]] may be installed but at the moment it is safer to reboot in Windows and see above...
 +
** If you are on your own computer, you need to download, install, and use a terminal program on your own computer.  For Windows folks this will be [[MobaXterm]] and for Mac folks it will be [[XQuartz]]; you should only need to install this once on your computer.
 +
* Connect to Duke's UNIX system and look at the space that has been created for you
 +
* Change into your EGR103/lab1 folder with
 +
cd EGR103/lab1
 +
* Use emacs to edit a text file containing LaTeX code
 +
* Use latex to process a tex document
 +
* Use dvipdf to convert the processed document to a pdf
 +
* Use evince to view the finished document
 +
* Rinse, wash, repeat.
  
 
== Downloading a Terminal Program ==
 
== Downloading a Terminal Program ==
Line 27: Line 45:
  
 
== Using UNIX ==
 
== Using UNIX ==
UNIX is a very powerful operating system; for this course, we will be using a very select few commands to get work done.  There are nine fundamental commands listed in the table at [[UNIX_Tutorial#Structure_of_the_Command_Line_-_The_Sentence]] and, of them, you will generally only use four of these commands: ls to list your files, cd to change directories, mkdir to make a new directory, and cp to copy files.   
+
UNIX is a very powerful operating system; for this course, we will be using a very select few commands to get work done.  There are nine fundamental commands listed in the table at [[UNIX_Tutorial#Structure_of_the_Command_Line_-_The_Sentence]] and, of them, you will generally only use four of these commands: ls to list your files, cd to change directories, mkdir to make a new directory, and cp to copy files.  A fifth command, pwd, will let you print the working directory to see where you are.  Your prompt will help with this too.
 
=== Demonstration ===
 
=== Demonstration ===
 
The following will take you through some UNIX commands to explore the space you have been given.  When you accepted Duke, OIT set up a 5 GB space on the system for you to save files for school work.  At each stage along the way, I will give you a command to type and then explain what the command does.
 
The following will take you through some UNIX commands to explore the space you have been given.  When you accepted Duke, OIT set up a 5 GB space on the system for you to save files for school work.  At each stage along the way, I will give you a command to type and then explain what the command does.

Latest revision as of 11:30, 29 August 2018

This page will go through the abbreviated, virtual version of Lab 1.

Introduction

Lab 1 is an introduction to Duke's UNIX system as well as to writing lab reports in LaTeX.

In Lab

Here's what we will do together in lab for this week:

  • Log in to a lab computer
  • Use MobaXterm to connect to login.oit.duke.edu
  • Connect to Duke's UNIX system and look at the space that has been created for you
  • Create a folder for the course in your home directory and create a folder for the first lab in your course folder
  • Use wget to copy a file from my web space to your lab folder
  • Use tar to expand the file you copied into the files you need for lab this week
  • Use emacs to edit a text file containing LaTeX code
  • Use latex to process a tex document
  • Use dvipdf to convert the processed document to a pdf
  • Use evince to view the finished document
  • Understand the basic troubleshooting techniques for LaTeX documents.

Out of Lab

On your own, to get work done, you will need to:

  • Log in to a computer.
  • Use a terminal program:
    • If you are on a Duke public machine running Windows, MobaXterm is installed.
    • If you are on a Duke public machine running MacOS, XQuartz may be installed but at the moment it is safer to reboot in Windows and see above...
    • If you are on your own computer, you need to download, install, and use a terminal program on your own computer. For Windows folks this will be MobaXterm and for Mac folks it will be XQuartz; you should only need to install this once on your computer.
  • Connect to Duke's UNIX system and look at the space that has been created for you
  • Change into your EGR103/lab1 folder with
cd EGR103/lab1
  • Use emacs to edit a text file containing LaTeX code
  • Use latex to process a tex document
  • Use dvipdf to convert the processed document to a pdf
  • Use evince to view the finished document
  • Rinse, wash, repeat.

Downloading a Terminal Program

For this class, all the software you need is already installed on Duke's system. The only problems are (a) Duke's system is in UNIX, which most of you have never used before, and (b) you have to access the system through some other computer. To handle the second problem, you will need to download a program that will allow you to connect to the system. Depending on what kind of computer you are using:

You should only ever have to install the program once.

Connecting to Duke's System

Whenever you want to do work on the Duke system, you will use your terminal program to connect. To do that, see:

Once you connect, eventually the remote system will ask you for your password. Note that the cursor will not move as you type in your password - the terminal does not want to show anyone how long your password is. After you connect, you should be at a prompt that will, among other things, have the word "production" in it. Congratulations! You have connected to Duke's public system and it is waiting for you to give it commands.

Using UNIX

UNIX is a very powerful operating system; for this course, we will be using a very select few commands to get work done. There are nine fundamental commands listed in the table at UNIX_Tutorial#Structure_of_the_Command_Line_-_The_Sentence and, of them, you will generally only use four of these commands: ls to list your files, cd to change directories, mkdir to make a new directory, and cp to copy files. A fifth command, pwd, will let you print the working directory to see where you are. Your prompt will help with this too.

Demonstration

The following will take you through some UNIX commands to explore the space you have been given. When you accepted Duke, OIT set up a 5 GB space on the system for you to save files for school work. At each stage along the way, I will give you a command to type and then explain what the command does.

pwd

The pwd command will print the working directory - this will show you where you are in the file system. If you type this immediately upon logging in, the system should respond with something that looks like /winhomes/NetID where NetID is your NetID. This is called your home directory. Note that in UNIX the ~ is a shortcut for the home directory. In your UNIX prompt, there is a ~ which is telling you you are home.

ls

The ls command will list stuff. When your folder was created, there was at least one folder created in it, and maybe others. The ls command will show you hat is in a folder.

ls public

This command will list the stuff in the public folder of your home folder. There's probably nothing there yet; just know that you can list the contents of other folders.

cd ~/public

The cd command is to change directories, and there are several different ways to tell UNIX where to go. The command above starts with ~ which is your home directory and then, from there, go to public.

Things to not worry about

  • Margins.
  • Extra space between the contents of the matrix and the determinant bars.
  • Zombies.