IT 441: Network Services Administration
Exercise #01

Complete by: 2/1/2018


Purpose

The purposes of this exercise are...

  1. If you don't already have one, to create a Unix account AND Windows account.
  2. To apply this course, so that the admins will create a course folder for you.
  3. Check out the perl utility on the Linux server.

It is important that you complete this exercise now, because you will not be able to do any further work in this course until you do.

Applying

Completing the apply process in the past was very complicated. Fortunately, we now have a web application that your can use. You will find instructions here: http://www.cs.umb.edu/~ghoffman/linux/apply_process.html

(Where the directions advice you to e-mail Professor Hoffman, you should e-mail me, instead.) The directions should also guide you to getting your Windows account.

(NOTE: If you do not have a Linux account now, do this when your account is working and you have an it441 directory.)

You will need to be able to SSH into your Linux account. On a Mac or Linux computer, you can use your standard Terminal program. On a Windows computer, you will need a utility like SSH Secure Shell Client or PuTTY. (This site has more detailed directions for SSH Secure Shell Client.)

Log in to users.cs.umb.edu

Looking at Perl

At the shell prompt, enter the command: perl -v
Take note of the version number. There may be some differences between this version of Perl and others that you encounter.

Get the path to your current directory

                pwd
While leaving your current ssh session window (#1) open and running...

...open up a separate ssh session in another window (#2) on users.cs.umb.edu and navigate to that same directory. Inside there, create the file hello.pl (note that .pl is referring to lowercase of P and L) with the following content:
#! /usr/bin/perl -l

print "Hello, world!" ;
print "Number: " . 6 ;
print "Number: " . (2 + 4) ;

Why are we doing our file editing in a separate session, instead of within the script session in our original window?

Back to your original session window (#1)...

Do a long listing to confirm that hello.pl exists:
ls -l
Confirm that hello.pl has correct contents:
cat hello.pl
Make the script executable:
chmod 755 hello.pl
Run the script:
./hello.pl

What would happen if the first line were simply #! /usr/bin/perl and we left out the -l part?

If you like, you may edit the file hello.pl back in the other window (#2) and run it again in #1.

Back to your original session window (#1)...

Exit your script session

                exit
Confirm you have a typescript file in your ex01 directory
                ls -l
Confirm the typescript file is readable
                less typescript
Look through the file and exit the less utility by typing q when finished.