Introduction to Skynet



This is a Quick and Dirty TM introduction to using your shiny new Skynet account and getting the most out of your three quid membership. Please mail any questions, comments, corrections and constructive abuse to hannes AT csn.ul.ie.

1  Basics

Logging on:

To log on to skynet from an ITD PC:

  1. Click Start, Run
  2. Type telnet skynet into the dialog box & press enter
  3. A window with a login: prompt should appear, type in your username and password

Some common problems:

If you've logged in successfully you should see a 'message of the day' and a shell prompt, something like

[hannes@skynet ~]$ _

Basic Commands

All Unix commands and filenames are case-sensitive : logout is not the same thing as Logout.

logoutLogs you out and disconnects you from skynet.
passwdChanges your login password.
pineStarts an email program. Your skynet account gives you an email address of the form username AT csn.ul.ie. The bottom of the screen lists the keyboard commands. Pressing M will take you back to the main menu, ^c (Hold down Ctrl & press c) cancels most commands.
ltinStarts the tin newsreader to read the skynet local news. tin shows a list of all the newsgroups with messages you haven't read. Use the up and down arrows to select a group and press return. Press return to see an article, space for the next page.
rtinStarts the tin program to read usenet (internet) news.

You might want to use a program like PuTTY, Tera Term or CRT instead of the Windows telnet program. You can download PuTTY from www.csn.ul.ie/~hannes/workshops.

2  More Commands

Online Help

manshows the online manual page for a given command. Example : ``man man''. Use <space> and b to page forward and backward, q to quit.
apropossearches the online manuals for a keyword. Example : ``apropos mail''

System Info

uptimeshow the amount of time skynet has been running for.
topshow the system load. Press q to exit.

Other Users

whodisplays a list of everyone that's logged in. Try who | more if the list scrolls off the top of your screen. The more program displays the output one screenful at a time. You can use it with any command.
finger usernamedisplay information about a user (real name, last login, unread mail etc).
chfnchange the information displayed about you by the finger command. finger also displays the contents of the files ~/.plan and ~/.project, if they exist.
write usernamesends a message to another user's screen. Type write username, then type your message, followed by ^d.
talk username`talk' to another user. Press ^c to exit.
mesg nstops others sending you write messages or talk requests. Use mesg y to turn them back on.

Useful Keys

^x here means hold down Ctrl and press x.

BackspaceIf this doesn't work as expected, try the `Delete' key instead.
^dDoes what you'd expect 'Delete' to do.
^a, ^eMove cursor to start of line, end of line. 'Home' and 'End' may or may not work.
^k, ^uKill (cut) everything from cursor to end/start of line.
^yYank back (paste) the last text killed.
^lClear and redraw the screen.
^cCancel a running command.

You can use the up and down arrows to recall previously entered commands.

3  Files

You can store up to 20 megabytes of files in your skynet account. The 20M limit is not enforced, so you can occasionally exceed it for short periods of time.

Accessing your files from NT

You can access files in your skynet account from an NT machine by mounting your account as a network drive:

  1. Right-click the `My Computer' icon.
  2. Click `Map Network Drive'
  3. A dialog box pops up. Type skynetyourusername into the `path' field and click OK.
  4. Enter your skynet password into the dialog box which appears. You can leave the `connect as' field blank.

This procedure should make an extra drive appear on the system, containing your skynet files. If it fails, check the User Guide on the skynet website for some possible fixes. If you tick the `reconnect at logon' box in the first dialog box the connection will be saved in your profile.

If this method does not work you can use FTP to transfer files to and from skynet. You can use the Windows FTP client, ftp.exe, or download ws-ftp from www.csn.ul.ie/~hannes/workshops. As a last resort, you can email files back and forth.

Working with files in Linux

Unix files are organised inside directories(same thing as folders). Directories can have subdirectories inside them, forming a tree. The ``outermost'' directory is called the root directory, or / to its friends.

Your home directory, which stores your own files is at /home/users/yourusername (note the forward slashes), meaning it's a directory inside the directory users, which is inside the directory home, which is inside the root directory.

To identify a file, you specify it's directory and name. Linux file and directory names can be any length and can contain almost any character. Some examples :

If you specify a file name containing a *, it will be interpreted as a wildcard. For example, ``project*'' refers to all files in the current directory with names beginning in ``project''.

File Commands

lsList the files in the current directory.
ls -lThe '-l' is a switch. Switches modify the way commands behave. This one gives a long listing, showing file sizes and other information.
ls -aList all files in the directory, including hidden files. Files and directories with names starting with a . are normally hidden.
ls -alhList all files in long format, displaying sizes in human-readable units. You can always combine one-character switches like this. ls -a -l -h does exactly the same thing.
ls -FShow which files are subdirectories and executable files by marking them with /s and *s.
ls --colorColour-code the list to show different file types and subdirectories.1
ls <name>Replace <name> with any valid file or directory name to see the listing for that file or directory.
ls -dList the name of a directory instead of its contents.
file <name>identifies the type of a file (e.g. binary file, ms-word document, text  file).
less <name>displays a text file on your screen. Press q to return to the shell, or h for help. This is the same program used to display the man pages.
cpCopy files. cp source destination will make a copy of the file source called destination.

cp -iAsk before overwriting any files (Interactive mode).
cp -rCopy entire directories recursively.

DOS users beware : ``cp mydirectory/*'' will not do what you expect and may overwrite some of the files you're trying to copy! You need to specify ``cp mydirectory/* .''.

mvMove / rename files or directories. Usage is like cp. The above warning to dos users also applies. Also note that you can't use mv *.abc *.def to rename multiple files according to a pattern.
rmRemove(delete) files. rm one two three deletes the three files one, two and three.
rm -iAsk before deleting any files (Interactive mode). Without this switch, the rm command will never ask ``are you sure?''. You have been warned.
rm -rDelete directories, and all files inside them recursively. Very dangerous...
pwdPrint the current working directory.
cd <name>Change the working directory. cd without a directory name means cd ~.
mkdir <name>Create a subdirectory called <name>.
rmdir <name>Remove a subdirectory. Safer than rm -r : only deletes empty directories.
duShow the diskspace used by this directory and those under it. Use 'du -h ~' to see how much space your account is taking up - please keep it under 20M!
dfShow the free diskspace.
mcStart the Midnight Commander file manager, which gives a friendly menu interface for handling files. The bottom of the screen lists the function keys. F9 activates the menus. If the function keys don't work, press escape and the number of the key (0 for F10).

Filename Completion

If you type the start of a filename on a Unix commandline and press Tab, the shell will try to automagically complete the name for you. If there is more than one possible completion you'll hear a beep. Press ^d (hold down Ctrl and press d) to see a list of the possibilities.

File Security

Any files and directories you create on the system are owned by you, and you decide who accesses them. ls -l will show the owner and access permissions for files. To see this info for a directory, use ls -ld.

File permissions are specified separately for the owner of the file, all members of the same group as the owner (on skynet this means every other skynet user) and for everyone else. The left hand column of the ls listing shows the permissions in that order. There are three permissions for each type of user:

r- read permission. This enables a user to read a file, or list the contents of a directory.
w- write permission. Enables a user to change or delete a file, or add or remove files in a directory. If no-one has write permission the file is read-only.
x- execute permission. Allows a file to be executed as a program or shell script, or allows files inside a directory to be accessed.

A '-' instead of a letter means that the permission has been disabled. For example, a file with permissions rwxr-x--x can be executed by anyone, read by its owner or anyone in the same group, but only written to by the owner.

You can change file permissions using the chmod command (change mode). Example:

chmod g+r coke.doc

This will give anyone in the same group as the file owner write access to the file coke.doc. The codes are : 'u' for the file owner, 'g' for the group, 'o' for others and 'a' for all (u, g and o combined). '+' enables a permission, '-' disables it.

You can only use chmod on files that you own. Note that files created on skynet are readable by anyone by default : the default permissions are rw-r--r--.

Editing Files

To create and edit text files in your account you'll need an editor. There are many available, here are four to try :

mceditthis is the editor of the midnight commander. Easy to use and quite powerful.
picothe internal editor of the pine program. Small and simple.
viPowerful, diabolically unintuitive... type :q!<enter> to exit from it, or :help<enter> to learn how to use it. Not for the faint of heart.
emacsthe editor with a built-in kitchen sink. Type ^x ^c to exit from it, or ^h t to learn how to use it.

4  Setting up a webpage

You can create a webpage by placing files in a directory called public_html in your home directory. You must give full read permission for the files you want to be visible in this directory. The address of your webpage will be www.csn.ul.ie/~username.

These are the steps to set up your page :

  1. Create the directory ~/public_html.

    mkdir ~/public_html

  2. Set its permissions correctly (the number 755 is equivalent to u+r+w+x g+r-w+x o+r-w+x, see man chmod for details)

    chmod 755 ~/public_html

  3. Put some files inside it. If you include a file called index.html or index.htm, then that file will be automatically loaded by the web browser when someone accesses your site. Otherwise they will see a listing of the files in the directory.

5  What Next?

Possibilities for future workshops, in no particular order:

Other sources of information:


Footnotes:

1 This won't work with Windows telnet - it can't display colours :-(


File translated from TEX by TTH, version 2.51, which slipped up badly in a few places, so I had to do loads of hand-editing.
On 7 Nov 1999, 14:40.