1. (7pts) Operating system (OS) and computer systems concepts
(a) We described four stages of OS evolution. Concisely state the major weaknesses of each earlier
stage of OS evolution
(b) What is the difference between a Linux kernel and a Linux distribution? Be brief. Name five
popular Linux distributions and the software package format that each uses
2. (12pts) Virtual machine (VM) environment and basic hardware information
(a) On a Linux computer, state two situations when the console login is needed. How to access the
console of your VM?
(b) Name eight customization parameters that you selected or entered when installing OS on your VM
(c) Find out and give the following basic information of your VM. Also give the exact command used
for each. Hints: you may read about the lscpu, dmidecode, df, lshw, and uname commands
i. Machine architecture - 32-bit i386 or 64-bit amd64 architectures?
ii. Processor - no. of processors, manufacturer, and model name (version) of each
iii. Memory - total amount of memory installed, no. of memory modules installed
iv. Disk - total amount of disk capacity, no. of hard drives installed
v. Network interface - no. of network interface installed, interface information for each
3. (6pts) System update, manual pages and NTP
(a) To ensure that your system is patched and always up-to-date, you need to update the software
on your system. What are the commands that you use to update your system?
(b) The man command is used to display the description, i.e., manual pages, of UNIX and Linux
commands, syscalls, library functions, etc. How many sections of the manual pages are there on
your VM? Which sections do the manual pages for lscpu and dmdecode commands reside?
(c) Install NTP. An important matter after installing an OS is to set the system time, so that all file
update times reflect the actual time at which they were last updated. On the Internet, the network
time protocol NTP is widely used to synchronize computer systems’ clocks with standard time
references. Install and turn on NTP on your VM to always keep its clock up-to-date. How do you
verify that NTP has been installed, and up and running?
4. (6pts) System information
Determine and give the following system information of your VM; give the command that you used
for each. Hints: consider lsb_release, ifconfig, route commands, and a few others
(a) OS - distribution name, version (release), Linux kernel version used
(b) Network - Hostname, IP address, network mask, default route/gateway, DNS name servers
(c) How long the system has been up and running
(d) Software packages that are installed. Save the answer into a separate file called “curr-pkgsâ€.
5. (15pts) UNIX shell commands, redirections, and pipes
(1) Write a shell command that processes a file called “lshw-output†that is at least 240 lines long,
finds those lines between line #10 and line #210 inclusive that contain the character string
“product:â€, removes duplicates, and writes the unique lines into a file called “product-listâ€.
(2) Write a shell command that displays the word count information (i.e., part of the wc command
output) for the longest .pl file in the current directory, in terms of the number of lines in files. YouÂ
may assume that there are no sub-directories in this directory. You may also assume that there is
only one such longest file.
(3) Write a shell command to find the subdirectory in the current directory that has the newest
modification time. Display its information using the long listing format (i.e., ls -l format)
6. (25pts) UNIX user accounts and groups
(a) Create three user accounts. The account name (login name) should follow the “firstname initial
lastname†convention. E.g., adavis for Ann Davis, jsmith for John Smith, and nmiller for Nichole
Miller. Place their home directories under the /home/users/ directory. E.g., the home directory for
adavis should be /home/users/adavis. Select three different initial login passwords for the three
users respectively. Create two user groups “ugrad†and “gradâ€. Make ugrad the primary group for
two of the three users, and make grad the primary group of the third user.
(b) Verify that these accounts and groups are set up properly by checking the related files under the
/etc directory. Also verify that both users are able to login their accounts and use the system.
Include in your hand-in the steps and commands that you used to accomplish these tasks.
(c) Set an account expiry date to one of the users. Use the chage command to verify the change.
(d) Suppose one of the users no longer remembers his/her password. How would you go about
resetting his/her password? Show steps you take and commands you use.
(e) (5pts bonus) In many cases, a system admin may need to create many accounts at the same time,
e.g., at the beginning of a new school year. Write a shell script that creates 20 user accounts, with
your choice of configuration variables, except that 10 of them should be in a group called “ugradâ€
and 10 others in the group “gradâ€. Only for clean-up purposes for this assignment, submit a script
that removes these accounts also. Note that in practice, deleting a user’s account does not happen
often and should be with sufficient advance notice and caution.
7. (15pts) File permissions. Log in to the three user accounts that you created in Question 6 above.
(a) What is the current umask for these accounts? When a user creates a file and a directory, what are
permissions on them respectively?
(b) Use the “umask†command to set default file permissions for all three users to contain owner read
and write permissions only, with no access to group users or others. Create a file for each user.
Verify that one user can’t access the file of another user. Describe your steps and include the
commands that you used.
(c) Change the permission of the file of one ugrad user to allow group read, verify that the other ugrad
user can now read this file correctly. Describe your steps and include the commands that you used.
Would you allow “group write†permission? What would happen if both users attempt to edit the
shared file at the same time?
(d) Change the permission of the file of the grad user so that the two ugrad users can read the grad
user’s file. Verify that this is indeed the case.
(e) Change permissions of the grad user’s home directory such that the ugrad users can enter that
directory but cannot see the content (meaning both file names and file content) in that directory.
8. (14pts) UNIX process control. Login as one of the three users
(a) Find out
i. the process id of my current shell, and its parent process’s process id
ii. how many processes I am running
iii.how many processes are running on the VM
iv. how many are sleeping, how many are stopped
(b) Find outÂ
i. how much of the main memory is used and how much is free
ii. how much of the swap space is used and how much is free
iii.the current load averages on your VM
iv.Identify a running process on your machine. Show its PID, owner user, physical memory size
consumed, virtual memory size consumed, and the name of the executable each is running.
(c) Suppose you would like to suspend a running process temporarily for investigation, what
command would you use? How to resume the execution of that process?
(d) If you decide to terminate the process, what command do you use? How would you make sure it is
terminated?Â












Other samples, services and questions:
When you use PaperHelp, you save one valuable — TIME
You can spend it for more important things than paper writing.