Unix Tutorial

Introduction

The set of Unix commands you will need to learn to get your work done is cd; ls -l; ls -a; pwd; mkdir; chmod; rm; rm -R; mv; cat; more; head; tail. These can be learned by following the steps described in the University of Surrey's Unix for Beginners.

To master these commands, please study the following sections of the tutorial:

Unix Introduction.

Read all of the Introduction except "Starting a UNIX terminal." To start a Unix terminal session at the U of O, follow these steps instead:

1. Start SSH (Windows) or a Terminal
2. Select the Quick Connect option. The Connect to Remote Host dialog will open.
3. Enter "shell.uoregon.edu" in the Host Name box.
4. Enter your DuckID user name.
5. Click the Connect button.

The Port Number (22) and Authentication Method (Password) should already be filled in by default.
For further information, please see SSH Secure Shell for Workstations documentation at the SSH website.

Tutorial One

* Listing files and directories
* Making Directories
* Changing to a different Directory
* The directories . and ..
* Pathnames
* More about home directories and pathnames

Tutorial Two

* Copying Files
* Moving Files
* Removing Files and directories
* Displaying the contents of a file on the screen
* 2.5 Omit (Searching)

Tutorial Five

* 5.1. File system security (access rights)
* 5.2. Changing access rights
* 5.3 omit
* 5.4 omit
* 5.5 omit

Self Assessment

Introduction: What is a CLI? What is Filename Completion? What is the "history" command, and how does it relate to the arrow keys?

Tutorial One: Ex. 1a, 1b. Study the diagram in section 1.5 and answer these questions:

Suppose the current directory is ug1. Show the command to list the contents of the directory named pg1, using an absolute pathname. Do the same using a relative pathname.

Suppose the current directory is ug1. Show the command to list the contents of the directory named scs, using an absolute pathname. Do the same using a relative pathname.

Suppose the current directory is ee51vn. Show the command to change to the directory named ma51ik, using an absolute pathname. Do the same using a relative pathname.

Tutorial Two: Ex. 2a, 2b. How can you view the last 15 lines of the file? The first 10 lines? What does this command do: wc -l science.txt. What does this command do: wc -m science.txt. (Use "man wc" to answer this one.) Extra Credit: What does this command do: "grep -ivc science science.txt".

Tutorial Five: Ex. 5a. What does this command do? chmod go-rw p1.html Show the command to add Read and Write permission for your Unix group, on a file named profile.html.