Brief Introduction to Unix/Linux and LaTeX

(Last modified 9/8/2002 )

Unix/Linux

Currently, Microsoft Windows-based operating system such as Windows Me and Windows 2000 is dominating in the business world. In universities, many people like Unix operating system, which are probably more reliable than Windows (do not crash as often as Windows). Linux operating system is Unix-based, open-source operating system.
To learn Linux, reading the Redhat documention Getting Started Guide is strongly recommended. Here, we introduce the basics of Linux.
1. Login : Type your username and hit 'Enter' key. Then, type your password and hit 'Enter'.
2. Open a terminal window: After login, you should have started the X Window System, a desktop environment, e.g. Gnome on our departmental Linux machines. The following link describes how to open a terminal window.
3. Logout: The following link describes how to log out.
4. Basic tasks: To learn how to perform some basic tasks in the shell windows, such as displaying filenames in a directory and change directory, the chapters Shell Prompt Basics and Manipulating Files at a Shell Prompt in the RedHat guide are good starting point. The following link summaries useful Unix commands. A comparison of DOS commands and Linux commands is also available here.
5. Printing: To print a file named 'foo.txt', simply type 'lpr foo.txt' at the shell prompt. The designated printer is in room 214E1.
6. View PDF files: To view a PDF file named 'foo.pdf', simply type 'xpdf foo.pdf' at the shell prompt.
7. View postcript files: To view a postscript file named 'foo.ps', simply type 'gv foo.ps' at the shell prompt.
8. Getting help: use man pages by typing 'man xxx' or 'info xxx', where 'xxx' is a command name.

Popular Unix Text Editors: Emacs and vi

The best way to learn these text editors is by starting with the tutorials. It only takes less than an hour to complete either one.
To start 'Emacs' tutorial, type 'emacs' at the shell prompt. You will see an 'emacs' window poped up. Select the item 'Emacs Tutorial' under the 'Help' menu using mouse. Or, you can type 'Control-h t' in the emacs window to start the tutorial.
To start 'vi' tutor, type 'vimtutor' at the shell prompt.

Communication between Unix/Linux machines

For security reasons, we recommend the following:
1. To remotely log into another Unix/Linux computer: Assume you are loged in the Linux computer 'laplace.math.iit.edu' and you want to remotely log onto the Solaris (Sun version of Unix) computer with the hostname 'hawk.iit.edu'. Type 'ssh username@hawk.iit.edu' and hit 'Enter', where you should replace 'username' with your username/loginID on 'hawk.iit.edu'.
2. To securely copy files between Unix/Linux computers: Assume you are loged in the Linux computer 'laplace.math.iit.edu' and you want to copy the file 'foo.tar' onto the Solaris (Sun version of Unix) computer with the hostname 'hawk.iit.edu'. Type 'scp foo.tar username@hawk.iit.edu:' and hit 'Enter', where you should replace 'username' with your username/loginID on 'hawk.iit.edu'.

Viewing MS Office files on Unix/Linux computers

1. First set up the software OpenOffice Suite at OpenOffice.org by following the steps 6--8 of the instruction. Note that the software is installed in the directory '/usr/local/OpenOffice.org1.0' instead of '/opt/OpenOffice.org1.0'. 2. Then, to view/edit MS Word file 'foo.doc', simply type '~/OpenOffice.org1.0/soffice foo.doc'. Similarly, for MS Excel sheet 'foo.xls', type '~/OpenOffice.org1.0/soffice foo.xls'.

LaTeX: A Document Preparation Processor

LaTeX is a generic typesetting system that uses TeX as its formatting engine. Professional publishing, especially mathematical formula, are often prepared using LaTeX instead of MS Word. The sequence for generating a LaTeX doucment for printing or viewing on a Unix/Linux computer is as follows
1. Use a text editor to create a text file, say named 'foo.tex'. The text file must follow certain format.
2. Then, compile the latex file by typing 'latex foo.tex'. If you have included references, then compile the latex twice by typing 'latex foo.tex' again. 'latex' generates a couple of files, including 'foo.dvi'.
3. To view the output, type 'xdvi foo.dvi' on one of your X window.
4. To print your DVI file on the default printer associated with your computer, type' dvips foo.dvi'.
5. For options for the commands 'latex', 'xdvi' and 'dvips', please refer to the man pages by typing 'man latex', 'man xdvi' or 'man dvips'.
6. PDF(Portable Document Format) is a commonly used file format for displaying and printing on both Unix, MS Windows and Mac OS environments. One can translate the LaTeX file into PDF format using 'pdflatex'. For example, the command 'pdflatex foo.tex' generates 'foo.pdf'. 7. Another portable file format is the postscript format. To translate the DVI file to the postscript format, type 'dvips -o foo.ps foo.dvi'. Then, you can view the postscript file by typing 'gv foo.ps'.

An example of LaTeX file 'small2e.tex' is in the directory '/usr/share/texmf/tex/latex/base/'. Copy the file to your home directory, compile and read the file to see how some of the features work.
For complete description on how to create latex files, see the official LaTeX User Guide.

On MS Windows environment, there is free LaTeX software called MikTeX. See the website for the software and its documentation.