Perl 2007: Linux Help

This text is part of the notes for a programming course taught at University of Tilburg, The Netherlands.

Creating an account on stuwww

The machine stuwww.uvt.nl is available for making the assignments for this class. If you do not yet have an account on this machine, you will need to apply for one by filling in the online form:

Application form for stuwww account

After you have accepted their terms by pressing Ik ga akkoord met deze voorwaarden, you need to fill in your ANR and associated password. This should get you to a page where you can fill in your choice for the password for the new stuwww account.

If the procedure is successful, you should receive an e-mail with the name of the account on your UvT mail address within minutes.

Connecting to stuwww

You can connect to stuwww with the command PuTTY. This command can be found in the Start Menu. Instructions for establishing the connection:

  1. Start PuTTY from the Start Menu
  2. Fill in stuwww.uvt.nl in the Host Name box
  3. Select SSH
  4. Click on Open
  5. Enter your stuwww login name in the new window and press Enter
  6. Enter your stuwww password in the new window and press Enter

If this set of instructions does not work for you then please ask for help.

Working from home

You can also connect to the stuwww machine from a home computer with Internet access. If you have a Windows machine at home then you can use PuTTY and the list of instructions mentioned above. If your computer does not have PuTTY then you need to download and install it.

Download PuTTY from stuwww

In case you have a Mac or a Linux machine at home then you can connect to stuwww by opening a terminal window and typing ssh NAME@stuwww.uvt.nl in the window where "NAME" is your stuwww login

Some stuwww commands

On stuwww, you will have a command line interface. By typing in commands, you can check the status of the machine and start programs. One useful command is ls -l which can be used for checking the contents of the current directory:

erikt@stuwww:~$ ls -l
total 12
drwxrwx---    2 erikt httpd   4096 2007-09-04 21:55 html
drwx------    2 root  root    4096 2007-09-04 21:55 mail
-rw-------    1 root  root    1687 2007-09-04 21:55 README

The names of the files and directories appear in the right column. The only interesting object in this directory is html, a directory which can be used for storing a home page.

We will start with creating a directory for our Perl files and jump to this directory:

erikt@stuwww:~$ mkdir perl
erikt@stuwww:~$ cd perl
erikt@stuwww:~/perl$ ls -l
total 0

The directory is empty. Let's start with creating a file with a simple Perl program. We create the file with the editor emacs, a program which can be used for changing text files. The most important command in emacs is the command used to leave the program: Ctrl-x Ctrl-c, which are two combinations of two keys: first the control key together with the x and then the control key and the x. Start emacs in the window:

erikt@stuwww:~/perl$ emacs test.pl

Then type line print "Hello world!\n"; in the editor and exit the editor with Ctrl-x Ctrl-c (answer y when it asks for saving the file). Now you have a file with a Perl program in the current directory. You can run this program with the command perl:

erikt@stuwww:~/perl$ ls -l
total 4
-rw-r--r-- 1 erikt wwwppl 25 2007-09-05 14:30 test.pl
erikt@stuwww:~/perl$ perl test.pl
Hello world!

The program performs its task: it prints the line Hello world!

Now you can start with the first exercise.


If you want to know more about the commands that are available in the command line window then check out Joshua Go's Introduction to Linux guide, the short emacs tutorial or ask the teachers, either in class or by sending mail to erikt(at)science.uva.nl

url of this page: http://ifarm.nl/erikt/perl2007/linuxhelp.html
Last update: September 06, 2007. erikt(at)science.uva.nl