The objectives of this lab experiment are to make you :
[Since this is your first lab in this course, a little bit of introduction regarding the structure of this document is in order. All future lab descriptions will have the same section structure as shown in the Table of Contents. The due date for the labs is shown on the course home page. The lab document should be studied long before a corresponding scheduled lab session, and certainly before you begin the actual Lab Experiment.]
The main goal of this course is to describe what an OS does and what its components are through two of the most prevalent operating systems. The lab experiments will ask you to do this and that in the hope of making you think about how some thing is doable because of the presence of an OS, and how well it is done in Linux or Windows. Our goal is not somehow get the end-results of a lab experiment; our goal is to present the underlying techniques and make you think about them in actual OS usage scenarios.
This course does assume that you have used Windows extensively. It does not assume that you have used Linux at all. So we will often spend more lecture time on Linux than on Windows but we think of both OS to be on par.
The OSIS Lab (429 Russ) has 30 PCs, all networked. Each PC can be independently booted by students into one of several variations of Linux, or Windows 7 Enterprise Edition. Each PC is set up so that it can be run "properly" even when disconnected from the network.
Even though security in the OSIS Lab is deliberately loose so that it is a playground for security courses, we take ethics and personal responsibility seriously.
The ceg233nn form of of user names are valid only in
the OSIS Lab (429 Russ) and that too on Linux Kubuntu only. You
log into Windows as "student" user. While we do not prevent outgoing
connections to any host, we do not permit remote logins to the
machines in the Lab from the outside.
When attempting to sftp to the WSU CaTS machine
named UnixApps1.wright.edu, you should use the login
names, which are of the form w123xyz, given to you by the
university.
The following are applicable to all your work (labs, projects, home work, and exams) in the course, and will not be repeated in other handouts.
In the OSIS Lab, the PCs are installed with Linux Ubuntu and Windows 7. In general, 32-bit or 64-bit does not matter in CEG233, except when explicitly required in a specific lab experiment.
These projects must be work done solely by you, except for any of the parts we provided during this term.
There is nothing wrong in seeking the help of others in understanding materials that you find difficult. But in the end, what you submit must be your work that you did -- beginning to end, every word, every line -- after you understood the concepts.
For work required to be done on Linux, you may use any Linux distribution that you prefer. For work required to be done on Windows, you may use either 7, XP or Vista. Doing the lab work on an operating system other than the OS explicitly named constitutes cheating.
Post all your questions, helpful comments, criticisms, and suggestions regarding this project to our discussion group. I am hoping for a lively discussion leading to good answers and clarifications. Keep an eye on this group.
All submissions are done using Linux machines from within the OSIS Lab. We have not setup Windows to accept submissions. We have also not setup to accept submissions via other WSU machines. If you commute to WSU from a residence farther than 10 miles, you may initially submit your files via email, but you will have to follow this up with a normal turnin like all other students.
Our turnin program is located
in /home/ceg233/ceg23300/bin
on all the Linux machines in the OSIS Lab. Its first argument is
the "name" of the lab, which is uppercase L followed by one
digit, e.g., L1. Following this are the names of files that you intend
to submit. So, for this part, the command line may look like this:
/home/ceg233/ceg23300/bin/turnin L1 ReadMe.txt
myLabJournal.txt answers.txt
assuming that you are in the directory containing the files named
above and relevant only to this lab. It is ok to use turnin for
a given Lab# multiple times; as long as the file names are the same as
before, the older files will be replaced by newer ones. You will
get an "ls -l" listing of files you turned in.
Once you learn the alias details, you can include the following in your ~/.bashrc
file./home/ceg233/ceg23300/bin
alias turnin=/turnin
This simplies the above to
turnin L1 ReadMe.txt
myLabJournal.txt answers.txt
The following files with names exactly as indicated, are always required in each lab.
All are plain text files. You may use any editor you wish to edit this
file. Note that part of our lab will be in Linux and part of in Windows;
you will therefore be editing the same file in two OS with different tools.
myLabJournal.txt: This plain text file is
like a diary entry. As you do your work in the lab, enter
your observations into this file. You can typically do this
via copy-and-paste of the lines you tyoed followed by the output
of the commands with some additional thoughts written up.answers.txt: This plain text file is a
collections of answers to specific items listed in the Grading
Sheet and other asked in the lab experiment.Note that at the risk of losing 10 points, you can email the files
to your grader. If you are a commuter, email the files before
the due date, and turnin the same files later but on or
before the date of next class.
A grading sheet will be shown as part of every lab/project. You should check with the grade sheet to be sure that you have attempted all that was required.
We try to read your code. But we depend mostly on observed execution of your code.
All work for this course is expected (but not required) to be done in the Operating Systems and Internet Security Lab (429 RC) . If you wish, use your home Unix/Linux/Windows machines, or those in other labs. However, our grading of your submitted project work includes the execution by us only on OSIS Lab machines.
Bonus points are awarded in recognition of good work, in addition to the max possible points. Quality is subjectively judged. Merely turning in a file will not receive full score.
Some of the above have a cascading effect.
Events. A keyboard key press is an event. Key release is
an event. Mouse button presses and releases are events. And so
on. Time stamp of an event. Events are coupled to certain
actions. Modern OSs are event driven.
Linux GUI: KDE, and Gnome Desktop Environments.
Cut-and-paste. KDE cut and paste buffer. Highlighting, ^C and ^V bindings are similar to Windows. Additionaly, middle mouse button click can paste what is currently highlighted.
Explain all the window decorations. Underlined characters --> ALT+that-key.
Exercise: Login to Linux in the OSIS Lab. Experiment and become comfortable with all the above. Tryout Konqueror. Browse through all the URLs you see.
Shells. Windows: PowerShell. Linux: bash (Bourne Again Shell).
bash is an interpreter of a shell language. The shell language is also called bash. All shell languages are legitimate programming
languages. Defined by grammars. Compilers and interpreters have parsers that analyze the "sentences" of a programming language to "recognize" them. Grammars are defined not at the level of character sequences, but at the level of "words" (called tokens).
E.g., the character sequence "ls -lisa dir01" becomes the token sequence w0, w1, w2 where w0=="ls", w1=="-lisa" and w2=="dir01". The spaces that separate the tokens do not contribute any tokens; they just "delimit" the tokens. Where you used one blank, you could have used a dozen, and it would not alter the tokenization. This procedure is also called Lexical Analysis.
bash treats w0 as the name of a program file. For the ls-line
discussed, it counts the number of arguments (argc) as 3. It
constructs an argv[] vector (synonym for array) of argument
strings. It then invokes exec system call of the OS. Recall that
the main method of most programs is declared (say using C++) as
int main(int argc, char * argv[]).
Back to w0. This is a name of a file that should be executable. The bash shell has a variable called PATH, whose value is a sequnce of directory names. E.g.,
PATH=/bin:/usr/bin:/usr/local/bin is listing the absolute
path names of three directories. The colon separates the
names. bash searches for a file name given by w0 in each of the
directories of PATH, from left to right. If the list is
exhausted, you get a command-not-found error.
A dot by itself stands for the current directory (i.e., where you are at). You would typically want to insert the dot in the PATH. At the very front!
Dot-bashrc and dot-bash-history. Aliases in bash and powershell.
Learn the commands listed here. You cannot claim to be
Linux-familiar unless you have used them all a few times.
Especially, learn to use the man pages, and
the script (read man script)
command.
This is an alphabetical list of standard Linux/Unix commands that you will/should be familiar with. The word "show" or "print" below means display to the stdout.
In beginning to learn these commands, do not try them (i) alphabetically, and (ii) without first looking them up (at least to figure out how to "exit" / kill a command).
| bash | Bourne-Again Shell |
bg | background |
| cat | show each file in sequence |
| chmod | change the permission on a file |
| chown | change the owner of a file |
cmp | compare two files |
| df | show mounted volumes, etc |
diff | show the differences between two files |
| du | show disk blocks used for one or more directories |
echo | shell built-in: echo/print arguments given |
| emacs | the all-powerful text/binary editor |
| env | lists the current environment variables |
fg | foreground |
file | guess what kind a file is |
grep | print lines matching a pattern |
kill | kills a running program |
| ln | creates a link between two files; try ln -s |
| ls | list contents of directory; try ls -lisa |
ltrace | show lib calls made |
| links | WWW/News/Mail browser; try links news:wright.ceg.433 |
| man | show reference pages; try man -k |
more | pagination |
od | octal dump; try od -x file-name |
ps | shows current processes |
| set | set/get and show the values of shell variables |
sftp | transfer files securely to/from a remote machine |
| source | shell built-in: execute the commands in a file |
ssh | remote login securely |
strace | show sys calls made |
time | a prefix to commands, times the command and prints page faults etc. |
top | like ps, but with continuous updates |
| umask | get/set the file mode creation mask |
vi | text editor |
| w | who is on the system, and what they are doing |
wc | word count, etc |
All work is expected, but not required, to be carried out in the Operating Systems and Internet Security (OSIS) Lab, 429 Russ. But, you are welcome to work wherever. Note that use of both Linux and Windows and other software, that may not always be installed in other facilities, may be needed.
[This is the first lab and there are items in the experiment that
we are yet to go over in the next day or two. This page uses
a mono space (typewriter) font for file names, stuff that
you type, etc. If it is not seen as a distinct
typeface, please fix font settings in your browser.]
"Explain/ Describe/ Discover ", as used below and in later lab
descriptions, stands for explaining
things in the file named answers.txt using your
own words, not cut-and-paste of some web search results.
This answers.txt file and
myLabJournal.txt do have substantial overlap. If you
wish, generate answers.txt from
myLabJournal.txt after you finish the listed tasks.
USB Drives
In Linux
ReadMe.txt, myLabJournal.txt,
answers.txt files as described in Expectations.
Note that you will be editing these files both in Linux and
Windows. Use any text editor you like (e.g., kate in Linux
and WordPad in Windows) to edit these files. Explore and
explain if the cut-and-paste model of Windows works in
Linux.konsole) window.
Demonstrate that you properly invoked at least 10 of the
commands from
Minimal List of Unix
Commands (other than emacs
and vi) by pasting a few lines
into answers.txt from the input/output of each command
you tried. bashrc is. .bash_history
is. alias is. Add the following
alias to your .bashrc file:
alias turnin=
/home/ceg233/ceg23300/bin/turnin.
turnin), and explain it.ps
and wc.In Windows
answers.txt file the numbers you see for
System Idle Process and any two among the remaining
processes. Record how many processes were running.
Use wordpad or someother program
(not notepad) to edit files created in Linux.powershell.
Invoke help. Receive further help on any two of
the items displayed. Explain what you learned of the two
items.answers.txt to your account
in unixapps1.wright.edu using
any ssh/sftp client program, and explain how you
did it. Note that the username you use for this machine is
the one given to you by WSU, which is of the
form w123xyz, not the one this course gave you,
which is of the form ceg233nn.turnin L1 ReadMe.txt myLabJournal.txt
answers.txt
Note that there are different turnin programs at WSU specific
to a course. For 233, you must use
/home/ceg233/ceg23300/bin/turnin (no spaces)
and invoke it from Linux (not Windows).
There are several sources for the material taught in this course. Our books are all on-line also, but please do not print more than, say, 10 pages per day in our lab. We are not so specific to any particular edition of the books. And, do not let the number of pages scare you! No way we can cover all that in ten weeks.
![]() |
Grading Sheet for
Instructor = |
| Student | LoginID | Bonus | Points |
| Item description | MaxPts | Points |
ReadMe.txt (i) your name, and e-mail address |
2 | |
ReadMe.txt (ii) a listing generated by ls -l of
the directory containing your lab files |
2 | |
ReadMe.txt (iii) an explanation of how the lab/project was
accomplished using the above files |
2 | |
ReadMe.txt (iv) highlights both the good points
and bugs and problems (if any) that this Lab has. |
4 | |
| Explore Linux KDE, and customize any 5 of eye candy items | 10 | |
| Learnt at least 10 of Minimal List of Unix Commands | 2*10 | |
Explain what .bashrc is in answers.txt |
05 | |
Exaplain what .bash_history is in answers.txt |
05 | |
Explain what an alias is in answers.txt |
05 | |
Define a new alias of your own (other than turnin), and explain it in answers.txt |
10 | |
Task Manager of Windows exploration answered in answers.txt |
10 | |
| Discover the full path name of "My Documents" | 05 | |
| Explain any 2 of the items learned via PowerShell help | 10 | |
| Customize whatever sftp client you used | 05 | |
Transfer the file answers.txt to your account in
unixapps1.wright.edu |
05 | |
| Late submission -2% per day late; not accepted after 2 days | -- | |
| Extraneous files submitted: -2 points per file | -- | |
Files were not submitted using turnin program: -10 points |
-- | |
| Total | 100 |