Getting Started With UNIX

Tim Welch

CS Tutors - Portland State Universiry

September 22, 2005

If you are logging in from a non-PSU system, information on how to connect remotely is available at http://www.cat.pdx.edu/network/shell-ssh.html. If you use Windows, you will need an SSH client (e.g., PuTTY). Instructions for getting a client are located at the bottom of the above webpage.

Selecting a Windowing Environment

The first time you log in locally on a Solaris UNIX machine you're asked to choose a windowing environment, which is your graphical interface to the system. The default is ``Gnome'' which is quite easy to use and similar to Windows in look and feel.

Starting a Terminal

Once logged in with Gnome, open a terminal (a.k.a. a console) by clicking the black computer screen icon on the top toolbar.

Using a Shell

The shell is the program you interact with inside the terminal via a command prompt, which allows you to run programs and gives you access to the filesystem. The default shell is C-shell (csh) and is quite limited; a better choice is TC-shell (tcsh). A more recent shell, Bourne-Again Shell (bash) is available but is currently not supported by our software package environment and is not recommended.

Change to tcsh

  1. Type chsh at the command prompt in the terminal window.
  2. Give your unix password when asked
  3. Enter /bin/tcsh as your new shell
  4. Type tcsh to switch now, the changes take a while to propagate.

Now let's check out some of the features of tcsh:

Keys -
The Backspace and arrows keys should now function normally.
History -
You can scroll back and forth through previously entered commands using the up and down arrow keys.
Tab Completion -
You can partially type in a filename or command and press the tab key. If you've provided enough characters to uniquely identify your file then it will complete the name for you.

Changing Your Password

To change your password, run the passwd command in a shell, enter your current password, and then enter a new password. It may take a while to find a password that is accepted! Good passwords have uppercase and lowercase letters, numbers, and punctuation. Afterwards, it will take a few minutes for the new password to propogate through all the systems.

Getting Around Your Home Directory

When you open a new shell, you begin at the top level of your home directory. To see which directory your currently in type pwd. It should be /u/yourusername. Some basic shell commands you will need are:
cd -
Change directory
mkdir -
Make directory
rm -
Remove a file
rmdir -
Remove directory
To use them, type the command followed by the directory or file you want in your terminal. See the UNIX reference card for additional information on using a shell.

Adding New Packages

The systems at PSU are setup so that users can easily customize what commands they have available to them based on their interests and classes. Access to additional software is done through the ``addpkg'' command. Currently, there are over 60 packages available (e.g., Java, LATEX, and Open Office). When you run addpkg, you will be presented with a list of available software packages each with an associated number. Once you have scrolled through the list, you can type in the number of the package you want, and it will be available to you the next time you log in.

MAN Pages

Information on how to use most commands and many other common UNIX terms can be found by consulting a MAN page, short for ``manual''. Just type man CommandOrTermName (e.g., man mkdir) in your terminal.

Opening a Web Browser

Two very similar web browsers, mozilla and firefox, are provided for your use. Start them up by typing mozilla or firefox in a terminal.

Adding a Desktop Icon

An icon to run a program is actually called a launcher in Gnome. Let's create a launcher for the firefox web browser:
  1. Right-click your desktop background
  2. Select ``New Launcher''
  3. Enter Firefox into the ``Name'' field
  4. Enter firefox (lowercase f!) into the ``Command'' field
  5. Select an icon image. Firefox icons are located at:
    /pkgs/uns/firefox/firefox-0.9/firefox-0.9.1/icons
  6. Click ``OK''

Email Accounts

Everyone with a user account can send and receive email. Your email address varies depending on the department you're in and the type of account that you have. If you're a CS student with a UNIX account, then your email address is yourusername@cs.pdx.edu. Other possibilities are ece, cee, and me. MCECS Windows account holders will have an email address of yourusername@cecs.pdx.edu1. Students with both Windows and UNIX accounts can send and receive with either. Consult the account printouts you received for more information.

There are a variery of graphical, text, and web-based mail readers available:

Pine -
Simple text-based mail reader. Type pine to start.
Mutt -
Full-featured text-based mail reader. Type mutt to start
Thunderbird -
Graphical mail reader, full-featured, similar to MS Outlook and Netscape Mail. Type thunderbird to start.
Webmail -
Access your email with a web browser from anywhere.
https://webmail.cecs.pdx.edu/
Pine and mutt are ready to go the moment you start them up. Thunderbird needs some additional setup. Information about MCECS mail servers are available at
http://www.cat.pdx.edu/network/mail.php.

Your Next Step

Do yourself a favor and spend some time with the following websites right now! They are indispensable reference and learning tools and will expose you to many things that will benefit you now and in the future.

The Computer Action Team

The CAT provides not only user support, but also support for most of the labs, computers, and networks within MCECS. Their site provides tons of information about using and accessing the UNIX, Linux, and Windows systems, including how to work between them. Information is also provided on using various resources such as printers, the wireless network, VPN, databases, content management systems, laptop access, and much, much more. Their web site is http://www.cat.pdx.edu/.

The CS Tutors

The CS tutors provide tutoring services in the UNIX lab (FAB 135) 7 days a week while school is in session. Our main focus is lower division CS students. As an added benefit, we provide introductory tutorials on our site which is at http://www.cat.pdx.edu/tutors/. A few that should be of interest to you right now are: Writing, Compiling, and Running Programs, Submitting Assignments, Viewing and Printing, and Shell Basics. The site also contains a Frequently Asked Question (FAQ) page with common questions and their answers. A current tutoring schedule and additional methods for contacting the tutors are also provided.

PSU ACM - Association for Computing Machinery

The PSU ACM chapter on campus hosts a number of presentations and events throughout the term, many of which are put on specifically to introduce students and faculty to the systems and software available. The ACM also offers tutoring in the CS lounge in addition to the tutoring provided by the CS tutors. Event and tutoring schedules are available on their website http://www.acm.pdx.edu/ or in the glass case outside the CS UNIX lab. Besides hosting presentations, the club's members coordinate and participate in a number of other academic and recreational activities. You are highly encouraged to become a member, to volunteer to be an ACM tutor, and attend club meetings. It makes for a more enjoyable and rewarding academic experience.


Footnotes

... yourusername@cecs.pdx.edu1
This email address is separate from the one you would have received with your ODIN account.