Networking Chapter 8 Homework Because The Top Utility May Stop automatically You Can Have Students Run Different

Document Type
Homework Help
Book Title
Guide to UNIX Using Linux 4th Edition
Authors
Michael Palmer
1
Guide to UNIX Using Linux Fourth Edition
Chapter 8 Solutions
Answers to the Chapter 8 Review Questions
1. You have obtained a new utility, called watchit, to monitor security on your computer and you
decide to run the utility in the background. Normally, to start the utility you would enter watchit at
the command line. Which of the following commands enables you to start and run this utility in
the background?
2. You’ve obtained over a hundred large graphics files to use in publications, but you want to be sure
there is enough available disk space on your computer to store these files. Which of the following
commands should you use?
3. Your company is launching a marketing campaign and to start, you’ve created a file, called
promotion, in normal uppercase and lowercase letters that will be used to place text for ads on the
Internet and in newspapers. When you show the promotional text to your boss, she is curious
about how it would look in all uppercase letters for emphasis. Which of the following commands
enables you to convert the text and save the result to the file, promotion_uppercase?
4. Which of the following can you restore from a backup tape made via the dump command?
(Choose all that apply.)
5. Your network has a combination of Linux and Microsoft Windows computers. There is a
Windows server that offers shared files for clients to access. Which of the following enables you
to access the shared files from your Linux computer?
6. You help manage the Linux server for your department. Right now the server has no protection
against power failures and there have been several power failures recently. To help make your
case for a power protection device, you want to keep track of the amount of time the server has
been running since the last power outage that caused it to go down. What command enables you to
track how long the server has been up?
7. You’ve purchased a new program for your computer, but the computer seems to slow down when
you run the program. Which of the following commands enables you to monitor the memory
usage as you run the program, so you can determine if the program is a memory hog?
8. You are working on a report about disk usage on your company’s server, to help determine if it is
time to purchase additional disks. Which of the following commands enables you to obtain disk
usage statistics for your report.
9. When you create a section name in a man page, such as the DESCRIPTION section, what tag
should you use just before the section name?
2
10. Which of the following are levels of backups that can be made with the dump command? (Choose
all that apply.)
11. How can you specify which device to use for a restore from a backup tape created by the dump
command?
12. You’ve opened your mail on the company’s server by using the mail command. Several messages
are listed. How can you tell which ones are new or unopened messages?
13. You suspect that your computer’s connection to the network is not working, because you don’t
seem to be able to connect to the Internet through the network. Which of the following commands
can help you determine if your connection is working? (Choose all that apply.)
14. You are setting up NFS to share files on the network from your Fedora Linux computer. Which of
the following is a service that must be running to enable you to use NFS for sharing files?
15. What is the command that you can use (from root) to start the service mentioned in Question 14?
16. In the following command, what is the purpose of o?
find . "(" -name a.out -o -name core ")"
17. You have a small network in your business with just a few network devices connected along with
22 Linux computers and you want to see how efficiently your network is designed. Which of the
following commands can you use from different computers to determine the route information
takes from one computer to another?
18. Your computer is slowing down because you’ve started a process that is taking most of the
memory and CPU resources. Which of the following commands enables you to find the process id
so you can stop that process?
19. Which of the following commands enables you to stop the process mentioned in Question 18?
20. Your colleague is creating a new man page to document a manufacturing process used by your
company. She wants to be able to quickly view the man page as she works on it and so that she
can have other people view it before copying the man page into production. Which of the
following commands enables her and others to periodically review her work in a format similar to
the man page format?
21. A user on your network has received an error message that there is another computer on the same
network using the same IP address, and so the user cannot access the network. You send out a
message to the 18 Linux users on your network to ask that they check the IP addresses on their
3
computers and e-mail this information to you, so that you can determine who has the duplicate IP
address. What utility do you tell users to run to determine their IP addresses?
22. Name two types of information that you can obtain using netstat.
23. What is the purpose of the top command and how can you use it to stop a process?
24. You are gathering information about the amount of disk space occupied by users’ home
directories. What command enables you to view a breakdown by individual directories under the
/home directory? (Provide the actual command you would run and any special considerations for
running it.)
25. Name two files that should be modified for security when using NFS.
Hands-On Projects Tips and Solutions for Chapter 8
Project 8-1
In this project, students use the dd command to convert an input file’s contents to lowercase and save
the output file.
Project 8-2
.
For this project, students use the df command to display information about file system use.
Project 8-3
In this project, students practice using the du command.
Project 8-4
4
For this project, students create garbage files in their home directory and the source directory. Next,
they use the find command to view the files they created and then to delete those files.
Project 8-9
This project enables students to practice using the ps command with different options.
Consider holding a class discussion to suggest different ways in which a single user or a system
administrator might use ps.
Project 8-10
In this project, students stop a process by using the kill command. If you have the resources, consider
starting several processes that students can practice stopping using this command.
Project 8-11
In this project, students create a document with misspelled words and then use the ispell command to
correct the errors.
Project 8-12
5
Project 8-15
Students learn how to use the mail utility in this project. They create a new message and send it to
themselves. Next, they access the message and review the commands available at the & prompt in the
mail utility.
Project 8-16
In this project, students learn to determine their IP address by using ifconfig. They also learn to look at
gross error statistics for communications problems. Note that on some systems (depending on the
distribution) the students will need access to the root account or will need to use sudo to run ifconfig.
Project 8-17
destination.
Project 8-19
In this project, students use netstat to view network statistics. They use it with the -a, -n, and -s
options.
Discovery Exercises
1. Use the df command to view file system use in megabytes.
2. Use the touch command to create the file letters. Next use the dd command to make a backup of
3. Use the command that gives you information about swap space and memory use.
4. Start the top utility. Notice that top is listed as one of the most active processes. Determine what
CPU percentage is used by running top. Stop the top utility.
5. Start the top utility so that it updates every 20 seconds. Now do you see top in the list of the most
active processes on your screen? Stop the top utility.
6. Use the command to determine which users have processes running on your system.
7. Log in as root and try using ifconfig, netstat, and route. Also, when you use ifconfig, record the
“inet addr” (IP) value for eth0 (your Ethernet address) or for lo (your localhost loopback address),
such as 127.0.0.1 for lo.
8. If you are connected to a network, use the ping command to ping one or both of the addresses you
obtained in Exercise 8. Also, if you have access to an Internet connection, use the ping command
to ping the GNOME Web site, using ping gnome.com (or use another site provided by your
instructor).
9. Log out of root and back in to your own account. Type the command to determine the PID of your
Bash shell session and record the PID.
10. Use the vi editor to create and save the famous_words file with the following contents (including
misspellings):
We mst all hang togther or
Assuredly we shll all hang separately.
-- Ben Franklin
Make a copy of the document using the dd command and calling the copy famous_words.bak. Use
a tool to check and correct the spelling errors in the famous_words document.
11. Use the cmp command to compare the famous_words and famous_words.bak files.
12. Start the top utility. Type ? after the utility starts. What information do you see? Press Enter and
stop the top utility.
13. Run the man program with the argument df in the background. Record the PID of the process you
have started.
14. Use the command to kill the process you started in Exercise 14.
15. Edit the phmenu.1 file, and add a new section named SEE ALSO. Under this section, list the
following files:
phoneadd
phlist1
16. Save and test the revised phmenu.1 file using the groff and man programs.
17. Edit the phmenu.1 file, and add a new section named BUGS. Under this section, list a line that
reads:
None Known
18. Save and test the revised phmenu.1 file using the groff and man programs.
19. Edit the phmenu.1 file, and add a new section named AUTHOR. Under this section, list your
name. Save and test the revised file using the groff and man programs.
20. Use the command that will enable you to view the documentation for ifconfig. Notice the many
options for configuring your network connection.
21. Find out the IP address of a friend’s computer or of a favorite Web site and use the command to
poll that computer or Web site.
Answer: Type ping plus the IP address and press Enter.
22. Use a command to view the contents of the /etc/init.d directory to see a listing of services you can
start on your computer. Do you see the portmap file?

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.