Difference between revisions of "EGR 103/Spring 2018/Lab 1"
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | This | + | This page will go through the abbreviated, virtual version of Lab 1 since...snow... |
+ | |||
+ | == 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: | ||
+ | * 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]] | ||
+ | * 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 xemacs 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. | ||
+ | |||
+ | == 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: | ||
+ | * Windows: See [[MobaXterm#Installation]] for how to install MobaXterm | ||
+ | * Mac: See [[X11#Installation]] for how to install XQuartz | ||
+ | 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: | ||
+ | * Windows: [[MobaXterm#Creating_a_Remote_Connection]] | ||
+ | * Mac: [[X11#Creating_a_Remote_Connection]] | ||
+ | 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. | ||
+ | === 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 == | == Things to not worry about == |
Latest revision as of 02:29, 17 January 2018
This page will go through the abbreviated, virtual version of Lab 1 since...snow...
Contents
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:
- 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
- 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 xemacs 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.
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:
- Windows: See MobaXterm#Installation for how to install MobaXterm
- Mac: See X11#Installation for how to install XQuartz
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.
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.