Next Previous Contents

1. Introduction

1.1 Intended Audience

This manual is intended to be a help guide. A large portion contains information to first time users of the Linux workstations, and for getting started using Linux. This manual also contains information on how to use available resources, such as software, and datasets. It also contains web sites that you may wish to visit for additional information.

If this is your first time using Linux, one of the open source versions of UNIX, this manual can assist you in becoming comfortable with using the computer. This is, however, only a help guide! Specific questions about Linux commands should be addressed by the online manual pages or reading a book on Linux. You may also wish to visit the Linux Documentation Project web site at http://www.linuxdoc.org/

If you are already familiar with Linux, this manual will help show you the availability of datasets and software on the Linux cluster. This guide should also tell you where and how to get other sources of information about a specific concern.

1.2 Purpose

Much time is often wasted learning how to use a new system, or searching for software and datasets. This manual is intended to help you save some time. If you are just starting out, this guide can help you feel comfortable about using Linux and step you through some basic concepts. Also, experienced users can use this guide as a help reference guide. Information about software usage and datasets can easily be acquired.

1.3 Getting an account

If you have a need to run large programs that require significant amount of computer time, you'll probably want to get an account on the Linux cluster. If however, you only need to browse the web, email and run small/fast programs, you probably don't need to have an account on the Linux cluster and a Windows based PC would be fine.

To get an account on the Linux cluster you please contact Martin Ewing or Angela Chan. You must first have a Pantheon NetID. You most likely already have a Pantheon account. If you do not have a Pantheon account and NetID, you should visit User Accounts at 221 Whitney Ave. You can also visit them online at: http://www.yale.edu/acct

1.4 First Time Users

The Linux machines have several window managers and several command interpreters, or shells, available to use. Some of the more popular window managers are KDE, Gnome and Afterstep. You can learn more about KDE by visiting http://www.kde.org/. There is also is section in this manual on the KDE Window Manager You can learn more about Gnome by visiting http://www.gnome.org/. Three of the most popular shells are csh, tcsh and bash. You can learn more about the csh and tcsh by typing man tcsh. You can learn more about bash by typing man bash. Due to limited resources, the number of window managers and shells that can be supported is limited. For the remainder of this document I will assume you will be using the KDE window manager and the C-Shell, or csh. Once you gain confidence, feel free to try the other window managers and shells but please be advised that the support is limited.

If this is your first time using Linux, you must have an account set up for you by the system administrator in order to use the system. If you do not have an account, see section Getting an account for instructions. Once you are sure you have an account set up for you, you can use the Linux machines. There is a computer lab in 120 Dunham Lab called the Garage, that you may use. You can start a session on a Linux machine by logging in at the workstation, or ssh, see section Connecting to remote hosts, ssh and telnet. If you are starting a session at the workstation, simply type your username and password. Your password is NOT echoed to the terminal.

Next you should open a terminal window. This window will allow you to type in commands. To open the window, click on the terminal icon at the bottom of the screen. This will bring up a window that you can type Linux commands into. You may also wish to investigate the other commands available through the Graphical User Interface, by clicking on the K and looking what other commands are available.

Your default directory, or disk location, is /home/USERNAME, where USERNAME is YOUR username (your NetID). For example, /home/smith. You will have a few files in that directory. To get a directory listing of your files, simply type ls. The ls command does not show all your files, it only shows filenames starting with a letter or number. To show a listing of all your files type ls -a The .login and .cshrc files contain alias, path, and other information that can be modified to tailor your session to the way you like it. These two files, .login and .cshrc, are executed every time you login to the machine.

To get online help about usage and commands available on Linux, you will need to read the manual pages. The manual pages are also referred to as "man pages", or simply man. So if you want a more complete description of the ls command, you should type man ls. If you are not sure exactly what the Linux command is that you want to use, simply type man -k string, where string is the text string that you want to look up. For example, if you want to know how to copy a file, but did not know what the Linux command for copying was, you might type something like man -k copy. The man -k procedure searches all the manual pages (man pages) for all occurances of the string (in this case copy).

You should probably look at the man pages under tcsh (same as csh but with command line editing). csh is the c-shell command interpreter. The csh commands are all the Linux commands that you will be using.

To quit your session on the workstation, place the arrow in any open area on the window and click the right mouse button. A menu will pop up. At the bottom of the menu click on Logout.

1.5 Changing your password

One of the first things you should do after successfully logging onto a Linux machine is change your password. To change your password simply type yppasswd. You will have to first type in your current password, then a new password two times. If you don't change your initial password within two weeks of getting your account, you will be locked out of the system.

You can use the yppasswd command when ever you wish to change your password.

1.6 Online help

As described in the previous section, you could use the man pages to get a complete description of a particular command and related subjects. You could also use the man -k string command to search through the man pages for commands that match a string. There is also a Xwindow application that lets you look at the man pages, it's called xman. To use xman, simply type xman. This has a nice break down of the Linux commands based on usage.

The Home Page for the Engineering IT has many online documents, including this document. So if you forget or lose this manual, simply start up a web browser and take a look at a copy: http://jove.eng.yale.edu/doco/EIT-USER

You can also download a postscript version of this document at: http://jove.eng.yale.edu/doco/eit-user.ps

User's Guide to the Linux system for EIT at Yale

If you forget or lose this manual, simply start up a web browser and take a look at a copy: http://jove.eng.yale.edu/doco/EIT-USER

User's Guide to the Linux system for EIT at Yale (Postscript)

You can also download a postscript version of this document at: http://jove.eng.yale.edu/doco/eit-user.ps

Introduction to UNIX

There is an online Introduction to UNIX manual at: http://www.econ.yale.edu/doco/UNIX-INTRO/ You can download a postscript verion of the document at: ftp://pooh.econ.yale.edu/pub/doco/unix_talk.ps

Yale University

Information about the University can be obtained by visiting http://www.yale.edu/

EIT

Information about the EIT at Yale can be obtained by visiting http://www.eng.yale.edu/

Obtaining a Pantheon account

To obtain a University account on the Pantheon system please visit http://www.yale.edu/acct

Yale Pantheon Email help

To learn more about pine, eudora and netscape messenger; and their configuration, use and tips at Yale, please visit http://www.yale.edu/email/email.html

EIT Dept mailing lists

You can look at the department's mailing lists and get information by visiting http://jove.eng.yale.edu/mailman/listinfo

EIT System Status

You can view the status of the Linux machines in the department by visiting http://jove.eng.yale.edu/bb

Submitting a question or problem

You can submit a question or problem by visiting http://wss.yale.edu/probs Please make sure you select "Engineering" as your Affiliation.

Please see section Submitting Questions and Problems for more information on submitting questions and problems.

Linux Documentation Project

The Linux Documentation Project has lots of very useful information and links to other sites. You can visit the web site at http://www.linuxdoc.org/

Yale's Proxy Web Server

Yale's Proxy Web Server allows you to obtain a temporary Yale IP for browsing restricted Yale Web sites from outside the University. You can learn more about the Proxy server by visiting http://www.library.yale.edu/pubstation/proxy/proxy.html or read the section Accessing restricted Yale web sites from outside Yale (Proxy Server).

GNU project

The GNU project is a collection of free open source software and documentation. Many of the programs used by Linux are from the GNU project. To learn more about the GNU project, please visit http://www.gnu.org

KDE Window Manager

The supported window manager in EIT is KDE. To learn more about KDE, please visit http://www.kde.org/.

Matlab

The matlab web site is at http://Mathworks.com,

1.7 Linux Introduction

One major difference between other operating systems and UNIX, is that UNIX is case sensitive. So on other computers, commands, type, TYPE, and TypE, may ALL work the same. In UNIX, however, more, MORE, and MorE, will be interpreted as different commands, and in fact only the Linux command more will work.

Linux does not have batch queues, it uses background to run jobs by lowering your priority. Please look at the man pages under nice for further descriptions. You may also want to read section Background Jobs in this manual.

The file structures are a little different on Linux systems. Linux has the following file structure:

           /directory/subdir/filename
 where:
           directory: top directory
           subdir: subdirectory
           filename: name of the file

Linux files do not have a device name, like DOS (C: for example). Subdirectories are separated by a forward slash "/". File names do not have to have an extension, although they can if you like. Also, there are no version numbers in Linux, so you only can have one copy of a file with the same name.

One of the most important Linux commands is the man command. The man command is short for manual and is often referred to as "man pages". The man command will give you informational help about a particular Linux command. So if you want to know more about a particular command listed in the table below, just type man command_name.

   For example:      man rm
If you are not sure of the exact command name that you want to use, you can use the man -k string command, where string is a character string that describes what you would like to do. The man -k string command searches all the manual pages (man pages) for the string you have typed in. For example: If you would like to know how to copy a file, you would type the following:
                     man -k copy

There is also an online Introduction to UNIX manual at: http://www.econ.yale.edu/doco/UNIX-INTRO/ You can download a postscript verion of the document at: ftp://pooh.econ.yale.edu/pub/doco/unix_talk.ps

1.8 Locating Files

The easiest method of locating a file is by using the locate string command, where string is the name or portion of the name of the file you are looking for. Be careful when using the locate command you may receive a lot of output from the command depending on what the string name you use.

1.9 Compile, Link, and Run a C Program

This section walks you through compiling, linking, and running a C program on the Linux machines. I will use the C program name prog.c in the examples. You can replace prog.c with your specific program name.

Compile and Link

The C compiler that we use is called the GNU-C compiler. The command to use is gcc. For help, use man gcc or visit the GNU web site at http://www.gnu.org

There are two ways to compile and link a C program: make and gcc. If you have a C source file called prog.c, for example, you can use gcc as follows:

              % gcc prog.c
First a note on the above example: I have used the percent sign (%) as the system prompt. Your prompt may be something different! You do NOT have to type in the percent sign. The above example will compile and link prog.c for you, and call the executable program, a.out. Every time you use gcc in this matter, it calls the executable a.out, no matter what the source code file is called. It is probably better to name the executable file the same name as the source code file, without the .c extension. So a better command to issue using gcc would be:
              % gcc -o prog prog.c &
The -o switch followed by the name prog, will name the executable prog, instead of a.out. Also note the ampersand (&) at the end of the command line. This will compile and link in background. You should use the background (&) whenever compiling, because compiling needs no input. For help on other switches, use man gcc or visit the GNU web site at http://www.gnu.org

Another way to compile and link a C program is by using make To use make on prog.c, simply type the following:

              % make prog &

make will look for the file prog.c, compile and link it, and call the executable image prog.

You may have object files and libraries to link with your program. Here is an example of how to compile and link your program, (prog.c), with an object file (sub1.o), and a library (lib.a). You should note that object files have the extension (.o) and libraries have the extension (.a).

              % gcc -o prog prog.f  sub1.o lib.a &

Running your program

To run an executable image, you simply type the name of the program, and tell it where the input is coming from, and where the output should go. By default, the input, also called "standard input" comes from the terminal keyboard. Also by default the output, also called "standard output", goes to the terminal screen. If you wish your program, prog, to get input from a file called prog.in you must redirect it using the less than sign (<). If you wish your program, prog, to put the output into a file called prog.out, you must redirect it using the greater than sign (>). Of course if you explicitly specify the output to go into a file from within your C source file, it will go there. Here is what a typical command line would look like:

              % prog < prog.in > prog.out &
Note: again since all the input and output has been redirected, the job can be placed in background (&). If your program, prog, is going to run for 1 minute up to 3 hours, you should put it at a lower priority in background by using nice (See section Background Jobs. To run a job that takes 1 minute to 3 hours, do the following:
              % nice -10 prog < prog.in > prog.out &
The nice -10 lowers the priority for you. If your job will take longer than 3 hours, you must lower the priority more by INCREASING to -19. In the above example I have again redirected the input and output to use the file prog.in and prog.out.

If you forget to place your job in background when you start it (you forgot to place the &; at the end of the line). You can still place it into the background by suspending the job, then pushing it into background. To first suspend the job, press control-Z. To push the job into background, simply type bg. Be sure to look at the man pages under bg (man bg).

Background Jobs

You should use the Background to run your jobs. To place a job in background, or lower priority, simply type an ampersand & after the Linux command you type in. If you have a moderately long job, or more than two people are logged on, you should "nice" the job. Simply type nice before starting your program. For really long jobs (3 hours or longer), you should lower the priority lower than the default nice priority. Please read the man pages for nice for more information (man nice). Here is an example of running a job that will take 15 minutes to 3 hours:

              %  nice -10 prog < prog.in > prog.out &
You should also note that I have redirected the standard input and output to use the files prog.in and prog.out. For jobs longer that 3 hours, change the -10 in the above example to -19.

If you forget to place your job in background, but still would like to put it into background, you must first suspend the job, then push it into background. To suspend the job, press control-Z. To push it into background, just type bg. If you would like to bring the job back into the foreground, simply type fg. You should also read the man pages about bg and fg.

1.10 Resource Files

Your UNIX environment is customized and controlled by resource files. You can create an environment that is most productive for you. It is profitable to take some time and learn about these resource files. Resource files start with a period ("."), followed by the filename. I will list the full names, including the period below. Subsequent references to the files will omit the period to avoid confusion. Here is a list of the major Resource files, what they control and their man page name:

    File name          Environment controlled          man page (help)
     .login                  session                     environ
     .cshrc                  cshell                      tcsh
     .bashrc                 Bourne again shell          bash

When your account was first created, you get a login and cshrc file. Every time you logon, these files are executed. Things like your directory path and aliases setup should be specified in these files.

1.11 Submitting Questions and Problems

There may come a time when you've tried to find out how to do something and just can't find the answer to your question. If you've tried using the man pages and search web sites, but you still don't know the answer to a question you should submit a problem to WSS keystone.

There also may be a time when you are using a computer and it appears to not be working properly. If you have tried everything to try and fix the problem, but can not figure it out, please submit a problem to WSS keystone. Please note, you should NEVER turn off the computer. Other people may be logged in or running programs in background. If you turn off the computer you will disrupt their work. Simply submit a problem to WSS keystone and try using another computer.

To submit a question or problem to WSS keystone please visit the following: http://wss.yale.edu/probs and click on Submit a problem. Make sure you set the affiliation to Engineering. As an alternative you can send email to: requests-eng@wss.yale.edu.

When you submit a question or problem to "requests-eng@wss.yale.edu" the question or problem gets entered into a problem tracking system at Workstation Support (WSS) called keystone. You will receive an email back containing the text of your question or problem along with some other information. The two important pieces of information are the "Slip Number" and the web address (URL) at the very bottom of this email message. Here is what a "sample" return email from keystone might look like:

---------------------------------------------------------------------------

Slip number -----: 1285
Problem ---------: [Unix-support] Sample problem.
Opened by -------: Paul Gluhosky <paul.gluhosky@yale.edu>
Date opened -----: Thu Nov  4 09:39:18 1999
---------------------------------------------------------------------------

       The text of your problem goes here.

---------------------------------------------------------------------------


           Full information on this slip is available at:
 http://wss.yale.edu/probs//yale_visitor.php3?sid=1285&v_func=zoom
---------------------------------------------------------------------------

You can visit that web address to get the status of your problem or question: who it's assigned to, any followups, contact information, etc. You should also go to that web address to "Add Followup". Do NOT send the same problem over again, it's already in the system. You can visit the web address and "Add Followup" and ask for a progress report if you like.

It may be useful to see who is assigned to your problem and what other problems your "worker" is working on. To do this visit: http://wss.yale.edu/probs Click on "Show just currently active slips". Click on "All active slips relating to" <whoever your worker is>

When you do submit a question or problem be sure to give as much information as possible. Please include time, date, hostname, any error messages, what you did to try and resolve the problem, etc. Put as much information as you can into your question.

If you use the web page to submit a problem or question, you will not get an email message back. You should write down the Slip number that you get so you can track the progress of the problem ticket. Otherwise you can visit the web site and click on Browse all slips and find your problem ticket that way.

Viewing Open and Unassigned Problems

You may have forgotten your Slip ID when you submitted your question or problem. Or perhaps you want to see how many problems are being worked on right now. Or maybe you just want to add a followup question, comment or ask for a status report on your problem. It's easy to do any of these. "Current Open Problems" are ones that have been assigned to someone to work on and may contain followups with work in progress or other questions. "Current Unassigned Problems" are newly submitted questions and problems that have not yet been assigned to someone.

You can visit "Current Open Problems" in the EIT by visiting here: http://wss.yale.edu/probs/visitor.php3?_parent=436&_status=o&v_func=select

You can visit "Current Unassigned Problems" in the EIT by visiting here: http://wss.yale.edu/probs/visitor.php3?_parent=436&_status=u&v_func=select


Next Previous Contents