|
|
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
- Getting Started
- Logging
on to the system
-
Start the secure shell client:
Start->Programs->SSH Secure Shell->Secure Shell Client
-
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
- Concepts
- 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
- What is your working
directory?
willow> pwd
- What files and directories are
in your working directory?
willow> ls
- 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
- What is in the file called myfile
?
willow> cat myfile
- 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
- Remove myfile
Confirm your success by listing the files
in your new working directory.
willow> rm myfile
willow> ls
- 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
- What is in the file called
goodfile?
willow> cat goodfile
- more - Displays text one screen at a time.
willow> more goodfile
- Using
UNIX commands
- 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
- 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
- Entering
commands
- Command
substitution
willow> cd [your number]
willow> date
willow> echo The date is
willow> echo The date is `date`
willow> man date
- 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
- 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
- For Further Information
|