How To Get Along With Unix

(or just seem like you do)

This tutorial is designed to give the most basic introduction to getting around in UNIX. It is focused on giving the novice user some idea of what's going on and how to get around in UNIX.

It was written as the first section to the UNIX Administration tutorial so mentions some aspects of the IRIX flavor of UNIX for SGIs.


Table of Contents

Section I: Overview


UNIX Organization

UNIX Administration

Getting Help

Section II: Introduction to UNIX

The C-Shell Environment

Command Line Syntax

UNIX Navigation

File Manipulation and Modification

Viewing Files

File Permissions

Creating Files and Folders

Copying, Moving or Removing Files and Folders

Modifying the .cshrc File

Command Aliases

Search Path

Startup Commands

Defining Variables

UNIX Power User Tips

Wildcard Characters

Filename Completion

I/O Redirection

History Substitution

Job Management

Command Scripts

Example 1: Simple Script,

Example 2: File Input,

Example 3: Multiple Input Arguments,

Section I: Overview

This manual gives a basic introduction to the UNIX operating system (OS), in particular, system administration. Although this manual should be helpful for any type of UNIX OS, it has been written for Silicon Graphics Inc. (SGI) IRIX, versions 5.3 or 6.5, which is a UNIX OS. It is not intended as an in depth guide to any particular aspect of the system. Copious information on every topic covered here (as well as many more) can be found in the IRIX on-line help manuals (see Getting Help, below).


Convention in this manual is driven by the desire to provide an easy to use reference document. Overall, words that directly refer to commands and occasionally concepts in UNIX are provided in the courier font. This is true of command syntax listings, specific keystrokes, examples, file names, and filesystem paths. Specific keystrokes are designated by enclosure in brackets (e.g. <esc>, for the escape character, <b> for the b key). Commands referenced in the text are given as a syntax listing following the paragraph or section, the exception being made up commands which are given as examples. Command syntax listings are indented from body text and give the generic command syntax in bold with variable arguments or options enclosed in brackets. If appropriate, the generic form is followed by an example of command usage in bold italic font. A generic example is shown below.

command [type of argument(s)]--- generic form

command argument example(s)--- specific example

Explanation …--- explanation of usage

UNIX Organization

The UNIX OS is based on a multiple-user framework. Many UNIX servers have hundreds if not thousands of individual users. For this reason it is essential that users do not have complete access to the system. This is accomplished by giving each user their own private account with a password and access privileges (reading and writing files) to a small portion of the system, their home directory. In general, many areas of the system are open to the user for reading files, but relatively few are open for writing files. This means that multiple users can have access to programs and information stored in the system but can’t destroy it or clutter it up. The exception to this rule is the system administrator, referred to as root or the super-user, and is discussed below (UNIX Administration).

Most ‘modern’ UNIX systems have multiple levels of user interaction. At the base is the UNIX kernel, although, in general, even the advanced user will not directly interact with this level of UNIX. The most basic way of accessing the UNIX kernel is by using a shell, which is a command line interpreter. A shell is used from a text-based window, either on the computer itself or from a remote location. The user types in commands with arguments and options (the input to the command) and the command performs the given function and returns output.

A separate way of accessing the kernel is through a GUI. Most GUI’s overlay or are based on X-windows, a relatively standard framework for UNIX GUI’s. The IRIX GUI is an icon-based desktop-type interface which is very similar to Macintosh or Windows type interfaces. Since it is intuitive and easy to use, basic operation of the GUI will not be discussed here. A feature of the IRIX GUI worth noting at this point, is the toolchest. The toolchest is a small window which has several menus with useful features for users, administrators and for finding help with topics.

UNIX Administration

The system administrator(s) must be able to perform tasks relating to the basic operation of the system. This is achieved through a special user account (root) which allows all access privileges to all areas of the system. Anyone logged in as root has these privileges, so it is essential that only a few users, at most, have this password. It should not be given out as a temporary solution to a particular user’s need for access to a particular region of the computer or for any other reason except to assume regular performance of administrative tasks. At risk of sounding paranoid it is essential that the password not fall into the wrong hands (i.e. anyone else but the system administrator) and steps should be taken to ensure that it does not. For instance, don’t write the password down, don’t type it in with someone looking over your shoulder and don’t give it out to anyone. A user with the root password has absolute control over the system and could really muck things up (e.g. quite easily erase all the information on the computer), even without meaning to. To use the root account either log in under the root account from the SGI login screen or use the su command from any shell as described below.

Basic system administration for the IRIX OS is really quite simple. All of the standard tasks performed by UNIX administrators has been given a GUI in IRIX. This makes complex tasks quick and simple to perform but tends to mask the real workings of the system. With a few exceptions, this manual deals with the GUI level of UNIX administration and does not delve into the confusing world of ‘real’, command-line UNIX administration. It is worth noting that the toolchest allows access to most of the system administration functions via the System menu.

su [user]

su mcdermoj

Allows the current user to switch user accounts to the specified user account. The command will prompt for a password before continuing.


su —

Allows the current user to switch accounts to the root account and become a super-user. Including the dash option will open the root’s shell which may make some operations easier.


Returns the name of the user account currently being used.

Getting Help

Under SGI IRIX several useful help features are available. Most GUI-based programs have some kind of help feature or menu built in. The toolchest Help menu allows access to manual pages as well as a large library of books, several of which deal with system administration.