print friendly version

How to...

Using IT Services Unix


UNIX is an operating system used by a large number of computers throughout the world, mainly used for server-based operations. IT Services manages a Linux server which runs on a UNIX-like operating system. You can connect to it with your normal username and password and this hostname:

unix.sussex.ac.uk

You can use this service by connecting from an IT Services PC or remotely from another computer (possibly from anywhere in the world).

Why use UNIX?

Some people use the UNIX system when they want to write their own computer programs in languages such as FORTRAN or C, or to use numerical libraries such as NAG.

[back to top]

Identifying yourself

Whatever method you use to gain access, you must specify the same username and password to login.

[back to top]

Using UNIX from an IT Services PC

The most common ways of accessing the Linux server from a Windows PC are:

a) Exceed onDemand: an interface similar to that on the PC, allowing you to run graphics-based programs. To access this, see detailed instructions in the online helpdesk at: sussex.ac.uk/its/helpdesk/faq1001. The interface allows you to run a number of programs that are installed on the Linux server, including MatLab, SAS and XTerm.

b) PuTTY: This interface is similar to DOS, but has much more powerful scripting languages available. This is available from the icon on the taskbar (shown right), or by the Start > All Programs > Utilities > PuTTY. You can then connect to unix.sussex.ac.uk using SSH (you will also need to enter your IT username and password).

[back to top]

Using software with enable

Some of the software on IT Services UNIX is not immediately available, for example the FORTRAN compiler. Before you can use such software you have to issue the enable command. In the case of FORTRAN, the command is: enable compilers

You have to issue the enable command once in every session before you can use the specified software. To see a list of the software that is available, issue the command without any parameters, i.e.: enable

[back to top]

Running jobs in the background

It is possible to run background jobs on IT Services UNIX system. This facility should be used with consideration as its abuse can cause inconvenience to others who are using the system interactively since the background jobs consume some of the service's resources.

You initiate a background job by using the command:

nice -19

You specify that it is to be a background job by typing an ampersand (&) at the end of the command line. The nice -19 command ensures that your job is run at minimum priority. This means that the job will run on an idle machine, but will be swapped out whenever something else requires processor time.

The full form of the command is:

$ nice -19 jobcommand &

where jobcommand is the command you wish to run as a background job.

If you need to terminate a background job before it has finished of its own accord, you have to find out its process identity number (PID) by giving the command:

$ ps -ef

This command lists the current processes on the workstation - you should be able to identify your job. Its PID will be in a headed column. Then give the command:

$ kill -KILL pidnumber

where pidnumber is the job's process identity number. Note that you can only terminate your own jobs.

[back to top]

Storing large files

You sometimes need to store more information than is permitted by your disk quota. To meet this need IT Services has assigned an area of disk space on central UNIX service. It can be used to hold work files, generated either by packages or your own programs, or for other files which need a temporary home.

There is currently a total of 4GB of scratch space available.

When you login to IT Services UNIX, you are automatically assigned a shell environment variable called $SCRATCH which refers to a directory in the scratch file system. The $SCRATCH variable can be used in any command to refer to your scratch directory.

To create this scratch directory give the command:

$ mkdir $SCRATCH

You can then copy, move or remove files to and from the scratch area as required. It is especially convenient for temporary storage of very large files, particularly if your own disk quota does not provide enough space. However, in order to be fair to all, we must put restrictions and conditions on its use, and we ask everyone to take note of these.

Restrictions

  • You must not treat the scratch area as an extension of your own, permanent file storage area.
  • Security copies are not made of the scratch area and you use it at your own risk. The scratch area is checked every night and any files that have not been modified for seven days are deleted.
  • If the scratch area is heavily used there is a possibility that it might become full despite these housekeeping measures. At such times we reserve the right to remove files as necessary, starting whenever possible with the oldest files.

In the past we have found that some people have given commands that update all their scratch files en masse, thus preventing seven-day deletion.

Strong exception will be taken to this practice if it recurs. In extreme cases the person may be prevented from further access and their scratch files forcibly deleted.

Note that you should always refer to your scratch files by means of the $SCRATCH environment variable. The actual value may be changed at any time in order to improve the service we provide, for example, to make available extra scratch space or balance out the load over the network. Such changes will be transparent if you use the environment variable, but not if you make use of the value it happens to have at a particular time.

Condition of use

The top-level directory of your scratch area must have the same name as your username.

Useful commands

 
$ mkdir $SCRATCH

Creates your scratch directory.

$ cp big.f $SCRATCH

Copies the file big.f from your current directory to your scratch space.

$ cp ~/bigger $SCRATCH

Copies the file bigger from your home directory to your scratch directory.

$ cd $SCRATCH

Changes your current, working directory to your scratch directory.

[back to top]

Printing

It is possible to print from UNIX if you are using any of the IT Services devices. You can use all of the printers available. You must have money in your printing account in order to print. You can insert money into your printing account using a Printing Account Banking Station (PABS).

The IT Services printers are all PostScript. This means that a plain ASCII file will have to be converted before it can be printed. IT Services recommend the psnup command for converting files. For further information see:

$ psnup -help

You can print to any printer from anywhere by specifying the appropriate queue name. Please note that you must specify the queue name in lowercase when using a printer from UNIX. See elsewhere for the queue name details.

[back to top]

TeX and LaTeX

The TeX and LaTeX documentation preparation systems are available on IT Services UNIX. TeX was originally produced by Prof. D. Knuth so that he could typeset a computer science textbook. TeX is very powerful but quite difficult to use. In order that people may use the power of TeX more easily a number of systems based on TeX have been produced. LaTeX is one of these. One of the useful features of TeX is its ability to produce complex mathematical expressions.

To use either TeX or LaTeX you must issue the enable command:

enable tex

We recommend that you use X Windows as this enables you to edit your source in one window and view your document in another.

To process the TeX file firstone.tex issue the command:

tex firstone

If the file is processed successfully the file firstone.dvi will be produced.

To process the LaTeX file firstone.tex issue the command:

latex firstone

If the file is processed successfully the file firstone.dvi will be produced.

We recommend that you view your processed document on the screen before printing it. The command to view the output, in a separate window is:

xdvi firstone &

You have to convert the output into PostScript format before you are able to print it. You do this with the command:

dvips firstone

You then print in the normal manner. For more information see above.

Further help is available via the manual pages tex, xdvi and dvips.

[back to top]

Finishing your session

When you have finished using the system you should issue the command exit to close down the Unix session. If using a PC, you must close your PC session in the usual manner.

[back to top]

created on 2010-01-01 by Andy Clews
last updated on 2013-03-19 by David Guest