




















| |
Lab 3
(Chapter 3)
Learning Objectives
- To learn about the various
components of a contemporary computer system
- To learn about the
structure of UNIX
- To learn about some
important system setups
Lab Work
- Log on to your UNIX system
- Browse websites of some
computer vendors such as Dell, HP, Gateway, and PricePC, and write down the
following:
- Configuration of a
typical personal computer system. Include the following information:
i.
CPU type (Intel and AMD CPUs, and CPUs used in Apple computers) and clock
speed in GHz
ii.
Main memory (RAM) size in MB
iii.
CD-ROM drive speed
iv.
Mouse type
v.
Size and type (flat panel, LCD, etc.) of monitor screen
vi.
Network card
vii.
Modem
viii.
Keyboard
ix.
Operating system
- List top-of-the-line
computer parts in terms of their size and technology used, along with their
prices.
i.
CPU
ii.
RAM
iii.
Hard disk
iv.
Pen (USB) drive
v.
Mouse
vi.
CD-ROM or DVD dirve
vii.
Monitor
viii.
Keyboard
ix.
Network card
x.
Modem
xi.
Operating system (Microsoft Windows, LINUX, MacOS, Lindows, etc.)
- UNIX manual is divided into
eight sections. Section 1 is for shell commands, section 2 is for system
calls, and section 3 is for library calls (3C for C language library calls).
Use the man command
to get information about the following commands, system calls, and library
calls: touch,
cp,
mv,
rm,
mkdir,
rmdir,
ls,
lpr,
cd,
pwd,
open,
read,
write,
close,
pipe,
socket,
mkfifo (command and C
language library call),
system, and printf.
Complete the following table by adding a short description for each, including
one or two typically used options for each command.
Command |
Short Description
|
Example Use |
touch |
|
|
cp |
|
|
mv |
|
|
rm |
|
|
mkdir |
|
|
rmdir |
|
|
ls |
|
|
lpr |
|
|
cd |
|
|
pwd |
|
|
open |
|
read |
|
write |
|
close |
|
pipe |
|
socket |
|
mkfifo |
|
system |
|
printf |
|
- Display the message that is
displayed when you log on. Hint: this message is stored in the /etc/motd file.
Show your session.
- Read through the following
files, if they exist on your system: /etc/profile, ~/.profile, ~/.bashrc, ~/.bash_profile,
~/.login, and ~/.cshrc. What are the values of the following shell environment
variables: PATH,
path,
LINES,
HOME, and
home. If you
don’t find any of these variables in the above files, use the
echo $variable command to display the value
of a variable, where
variable may be PATH, path, LINES, HOME, pr home. Show your session.
- Use the
man ls command to
display the manual page for the
ls command. How many
lines are displayed at a time, before you are prompted to hit
<Spacebar> for
displaying the next page? Now execute the following commands (in this order)
and rerun the man ls
command:
LINES=15
Export LINES
How many lines per page are displayed now?
|