MCSR_logo.jpg (56K)
Home My MCSR Supercomputers Software Research Education
Login
Quick Links:

FAQs
Minicamp
Chemistry
insideHPC Blog
Current Jobs
Job History
Mathematica
Training
News
Contact Us

Introduction to Unix, Part 1

Other MCSR Seminars

Description

Unix is the operating system for cypress, sunset, sweetgum, magnolia, willow, cedar, and redwood. This seminar will give an overview of Unix and its function in the context of the Internet. The following topics will be covered: Logging on to the system; Logging off the system; Changing your password; The UNIX file system; Understanding commands and processes; The shell; Using UNIX commands; Looking-up commands in the on-line manual.

Scope

The most recent offering of this seminar was February, 2005, at the University of Mississppi. The general information presented here will be valid indefinitely; however, the exercises, where present, are only meant to be valid for the date of the seminar, as the student account will be disabled after the seminar. To request another offering of this seminar, please contact the MCSR staff.

Text in red denotes commands to be entered at the command prompt by the workshop student.

Outline

  1. Getting Started
    • Logging on to the system
      1. Start the secure shell client:
        Start->Programs->SSH Secure Shell->Secure Shell Client
      2. Connect to willow:
        From the secure shell window, click Quick Connect.
        Then, from the Connect to Remote Host pop-up window, enter:
        Hostname: willow.olemiss.edu
        User Name: student
        and click Connect.
  • Changing your password
    1. Concepts
      • What is an operating system?
      • The UNIX file system
        Linux File Hierarchy
      • Understanding commands and processes
      • The shell
    2. Commands
      • A few essential UNIX commands
        • pwd - print working directory - print the contents of the working directory
        • ls - list - list contents of directory
        • cd - change directory - changes the working directory
        • cat - catenate - print the contents of a file
        • more - print the contents of a file ... with scrolling
        • cp - copy of a file
        • rm - remove one or more files
      • Practice
        1. What is your working directory?
          willow> pwd
        2. What files and directories are in your working directory?
          willow> ls
        3. Change your working directory to be the directory corresponding to your student number. Confirm your success, and list the files in your new working directory.
          willow> cd [your number]
          willow>
          pwd
          willow>
          ls
        4. What is in the file called myfile ?
          willow> cat myfile
        5. Make a copy of myfile in the same directory, and call the new file mynewfile
          Confirm your success by listing the files in your new working directory.
          willow> cp myfile mynewfile
          willow>
          ls
        6. Remove myfile
          Confirm your success by listing the files in your new working directory.
          willow> rm myfile
          willow>
          ls
        7. Change your working directory back to your home directory. Confirm your success, and list the files in your working (home) directory.
          willow> cd
          willow> pwd
          willow> ls
        8. What is in the file called goodfile?
          willow> cat goodfile
          • more - Displays text one screen at a time.
          willow> more goodfile
      • Using UNIX commands
        1. About commands
          • man - The man command which is short for manual provides in depth information about the requested command or allows users to search for commands related to a particular keyword.
          willow> man ls
        2. Where are commands located?
          • echo - Echo's to the screen what you type after echo. Echo is useful for producing diagnostics in command files, for sending known data into a pipe, and for displaying the contents of environment variables.
          willow> echo $PATH
          willow> which ls
          willow> which man
          willow> man which
        3. Entering commands
        4. Command substitution
          willow> cd [your number]
          willow> date
          willow> echo The date is
          willow> echo The date is `date`
          willow> man date
        5. Redirecting standard input and output
          willow> date > today
          willow> cat today
          willow> date >> today
          willow> cat today
          willow> date > today
          willow> cat today
          willow> echo today
          willow> mail email < today
        6. Connecting commands together
          • who - Displays who is on the system.
          willow> who
          • wc - Short for word count, wc displays a count of lines, words, and characters in a file.
          willow> wc hello.c
          willow> man wc
          willow> wc -l hello.c
          willow> who | wc -l
          willow> who | wc -l | wc -l
          willow> who | wc -l | wc -l | wc -l
      • Looking-up commands in the on-line manual
    3. For Further Information
      • UnixHelp

    Last Modified:August 26, 2008 09:38:41.   Copyright © 1997-2012 The Mississippi Center for Supercomputing Research. All Rights Reserved.   The University of Mississippi
    Valid RSS