getting started with linux l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Getting Started with Linux PowerPoint Presentation
Download Presentation
Getting Started with Linux

Loading in 2 Seconds...

play fullscreen
1 / 39

Getting Started with Linux - PowerPoint PPT Presentation


  • 317 Views
  • Uploaded on

Getting Started with Linux Douglas Thain thain@cs.wisc.edu University of Wisconsin, Computer Sciences Condor Project October 2000 Who are we? Mr. Douglas Thain (thain@cs.wisc.edu) University of Wisconsin (Formerly University of Minnesota) I/O in widely distributed systems

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Getting Started with Linux' - JasminFlorian


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
getting started with linux

Getting Started with Linux

Douglas Thain

thain@cs.wisc.edu

University of Wisconsin, Computer Sciences

Condor Project

October 2000

who are we
Who are we?
  • Mr. Douglas Thain (thain@cs.wisc.edu)
    • University of Wisconsin
    • (Formerly University of Minnesota)
    • I/O in widely distributed systems
  • Dr. Patrick Schelling (schelling@anl.gov)
    • Argonne National Labs
    • (Formerly University of Minnesota)
    • Atomic modeling
  • Both resident at NCST October 15-27
lectures and workshops
Lectures and Workshops
  • “Getting Started with Linux”
    • Editing, compiling, and graphing on the new Linux machines.
  • “Condor by Example”
    • Managing 100s of jobs over weeks or months with Condor.
  • “Installing and Managing Condor”
    • Technical matters of running Condor.
overview
Overview
  • Lecture
    • Cluster Overview
    • What is Linux?
    • Software
  • Workshop
    • Logging In and Getting Help
    • Compiling a Program
    • Graphing Results
linux cluster
Linux Cluster
  • One large server
    • 800 MHz CPU, 512 MB memory, 20 GB disk
  • Five smaller client machines
    • 666 MHz CPU, 128 MB memory, 10 GB disk
  • All run the Linux operating system
  • Managed by Condor software
cluster overview
Cluster Overview
  • People may sit and work at any client.
  • Condor software will make use of clients that are not in use.
    • Jobs restarted after power failures.
    • Jobs moved to idle machines.
    • Jobs run in the middle of the night.
  • More about Condor at 2nd lecture.
cluster overview7
Cluster Overview

Server

Work managed by Condor

Client

Client

Client

Client

Client

cluster overview8
Cluster Overview

Server

Work managed by Condor

Client

Client

Client

Client

Client

cluster overview9
Cluster Overview

Server

Work managed by Condor

Client

Client

Client

Client

Client

what is linux
What is Linux?
  • Linux is a free operating system.
  • An operating system is the basic software which manages a computer.
    • Windows NT
    • Macintosh OS
  • Linux is a variant of the UNIX operating system.
    • Solaris
    • IRIX
advantages of linux
Advantages of Linux
  • Linux is free:
    • Price is zero.
    • Unlimited copies permitted.
    • Read and change source code.
  • Manuals are on-line.
  • Common in scientific circles.
  • Text interface is good for batch processing and management.
disadvantages of linux
Disadvantages of Linux
  • Text interface is not as user-friendly as Windows.
    • But, has StarOffice software which is looks much like Windows.
  • Less commercial software available.
    • But, more scientific software available.
  • More difficult to set up.
    • But, once set up, easy to manage.
available software
Available Software
  • Most software for Linux is also free!
  • The GNU project is the source of much free software: gcc, g77, emacs
  • Workshop will concentrate on these text-based programs.
available software14
Available Software
  • Compilers:
    • G77 (FORTRAN 77)
    • Gcc ( C )
    • g++ (C++)
  • Text editors
    • Emacs
  • Typesetting
    • Troff, TeX
  • Graphing
    • Gnuplot
available software16
Available Software
  • StarOffice provides a Windows-like environment:
    • Word processor
    • Spreadsheet
    • Overhead slide designer
  • Can load and save existing files created on a Windows computer.
workshop
Workshop
  • Logging In
  • Running a FORTRAN Program
  • Graphing and Printing Results
  • Managing Files
  • Logging Out
create a shell window
Create a Shell Window
  • Press the _____ button to create a shell window.
  • To move the window, grab the top.
  • To resize the window, grab the corners.
create another
Create Another
  • You will type commands into a shell.
  • If you like, you may do several things at once.
  • Make another shell and arrange them side by side.
create a program
Create a Program
  • Three steps to creating a program
    • Create a source file
    • Compile the source into a program
    • Run the program
create a source file
Create a Source File
  • Let’s write a simple FORTRAN program and store it in the file “simple.f”.
  • Type:
    • emacs simple.f &
  • In the new window, enter the simple program on the next page:
create a source file24
Create a Source File

PROGRAM SIMPLE

REAL I

DO I=1, 100

PRINT *, I, SIN(I)*(I**2)

END DO

END

Important:

Indent 7 spaces

Type in all CAPITALS

create a source file25
Create a Source File
  • When you are done typing, click “files” then “save buffer”.
compile the source
Compile the Source
  • Use the GNU FORTRAN 77 compiler to convert the source file into an executable program.
  • In the shell window, type:
    • g77 simple.f -o simple

Run the FORTRAN compiler.

Read the source from “simple.f”

Create the program in “simple”

run the program
Run the Program
  • Type ./ and the name of the program:
    • ./simple
  • It will display a table of x2sin(x) for all x from 1 to 100:

1. 0.842470957

2. 3.63718963

3. 1.27007997

saving the output
Saving the Output
  • To save the output in a file:
    • ./simple > output
  • To look at the output later:
    • cat output
  • The output is very long! To look at it slowly:
    • cat output | more
  • To print out the output:
    • lpr output
  • To print out the source:
    • lpr simple.f
graphing results
Graphing Results
  • To graph the output of our simple program, start gnuplot and then direct it to the output file:
    • gnuplot
    • plot “output”
  • There are many different options for plotting:
    • plot “output” with lines
    • plot “output” with dots
  • When done plotting, quit gnuplot:
    • quit
graphing results30
Graphing Results
  • To save a graph in a file:
    • gnuplot
    • set terminal postscript
    • set output “graph.ps”
    • plot “output”
    • Quit
  • To view the graph later:
    • gv graph.ps
  • To print the graph:
    • lpr graph.ps
managing files
Managing Files
  • To list files:
    • ls
  • To move files:
    • mv
  • To copy files:
    • cp
  • To remove files:
    • rm
managing files32
Managing Files
  • Look at all your files:
    • ls

simple.f simple output graph.ps

Source code

Output file

Saved graph

Compiled program

managing files33
Managing Files
  • Try moving one file to another name:
    • mv output oldoutput
  • Now list again to see the results:
    • ls

simple.f simple oldoutput graph.ps

managing files34
Managing Files
  • Make a copy of the saved graph:
    • cp graph.ps graph2.ps
  • Now list again to see the results:
    • ls

simple.f simple oldoutput graph.ps graph2.ps

managing files35
Managing Files
  • Remove the output file: (be careful!)
    • rm oldoutput
  • Now list again to see the results:
    • ls

simple.f simple graph.ps graph2.ps

online manuals
Online Manuals
  • Each of these commands has many different options. Use the “man” command to read online manuals:
    • man ls
    • man g77
  • If you don’t know exactly what command to use, use “apropos” to propose man pages:
    • man -k delete
logging out
Logging Out
  • When done, you must log out of the machine so others may use it.
  • Quit all open programs:
    • In gnuplot, type “quit”.
    • In emacs, select “files” then “exit”
    • In a shell window, type “exit”
  • Finally, press the “logout” button.
more things to try
More Things to Try
  • The StarOffice tools:
    • soffice
  • Online manuals:
    • man ls
  • Help with gnuplot options:
    • gnuplot
    • help
change to workshop
Change to Workshop
  • Meet in room ____ at _____
  • Bring printouts to follow along.