Networking Chapter 1 Homework This capability Can Time Saving When Executing Multiple Commands project 19in This Project Students

subject Type Homework Help
subject Pages 7
subject Words 2456
subject Authors Michael Palmer

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
1
Guide to UNIX Using Linux Fourth Edition
Chapter 1 Solutions
Answers to the Chapter 1 Review Questions
1. Your boss drops by your office in a hurry to ask you to attend a meeting at 10:30 on Friday morning
and you can’t find a pen to make a note as a reminder. What Linux command can you use to make a
quick note to store in a file called Meeting?
2. Before you make the note in Question 1, you decide to determine Friday’s date, so that you can include
it in your note. What Linux command can you use to quickly determine the Friday’s date?
3. While you are typing a command, you misspell the name of a file you want to specify with the
command. Which of the following command line key combinations enables you to go back and fix
your error?
4. You haven’t changed your user account password for several months and now decide to create a new
password. Which of the following commands should you use?
5. You have forgotten the purpose of the -n option in the cat command. Which of the following can you
enter at the Linux command line to find out what the -n option does when used with cat?
6. Which of the following is the UNIX distribution originally developed through AT&T Bell Labs?
7. Which shell is used by Linux as the default command interpreter?
8. You need to type in a line of text to the end of a file called Annual_Report. Which of the following
commands enables you to add the text?
9. SSH can be used to ___________________.
10. This is your first day on the job as a Linux server administrator and your boss gives you the password
for root. What is root?
11. In your document files, you often put the date you created the file and the date you last modified it in
the last two lines of the file. What command can you use to look at only the last two lines of the file
called, project?
12. You are working with a new colleague who has entered the man command, but who does not know
how to end the man session to return to the regular command prompt. What keystrokes do you show
your colleague to end the man session? (Choose all that apply.)
page-pf2
2
13. Which of the following are examples of Linux distributions? (Choose all that apply.)
14. Which of the following commands enable you to view the contents of a file? (Choose all that apply.)
15. When you enter the who command, what information do you see? (Choose all that apply.)
16. You have been entering lots of commands and now your terminal window is cluttered will all kinds of
activity. What command can you use to clear your window of the clutter?
17. You share a Linux computer with a coworker. What is the best way to exit your UNIX or Linux
session when you are done?
18. You work at a law firm with eight other people. All of the eight computers on the firm’s network use
wireless connections to communicate with one another without a server. This is an example of which
of the following?
19. On which of the following types of computers might you find a UNIX or Linux operating system?
(Choose all that apply.)
20. You’re in a hurry and have just executed a command to print the contents of a file; and you decide you
want another copy of the printout. What key sequence can you use to repeat the last command, which
was used to print the file?
21. Your international company is scheduling a meeting among managers in Canada, the United States,
Spain, Sweden, and Hong Kong on the basis of Greenwich Mean Time (GMT). What command
enables you to display the current time in GMT?
22. How would you describe the purpose of the more command?
23. What is the purpose of Telnet?
24. You enter Cal on the command line to view a calendar but only see an error message. Explain why you
got the error message.
25. Explain how you can run more than one command on a single command line.
Hands-On Projects Tips and Solutions for Chapter 1
page-pf3
3
Project 1-1
In this project, students use Telnet in Windows 2000/XP/Vista to access a remote computer running
UNIX/Linux. Students will need accounts on both the Windows 2000/XP/Vista computer and the
remote computer that they access. You will also need to provide them with an IP address for the
remote computer.
Project 1-2
This project enables students to access a remote UNIX/Linux computer using ssh from a terminal
window.
Project 1-3
Students practice using the date command. In the process of completing this project, they learn what
happens when a command is typed in the wrong case.
Project 1-4
.
This project enables students to explore the value of the cal command.
In Step 1, students should report that they see a calendar for the current month.
In Step 2, a Julian calendar is displayed for each month of the year 2009.
Project 1-5
In this project, students experiment with the who command. In the process, they also learn to use two
options at the same time with the command.
In Step 7, the name, line, time logged on and comment are shown for the user currently logged on.
Project 1-6
This is a simple project in which students focus on clearing a cluttered screen by using the clear
command.
Project 1-7
In this project, students learn to use the man program and then the whatis command to learn more
about specific commands and programs. Make certain the database for whatis is created before
page-pf4
4
Project 1-8
This project enables students to practice editing what they have typed on the command line. This
capability can be time saving when executing multiple commands.
Project 1-9
In this project, students learn how to execute multiple commands on a command line by using the
semicolon separator between commands.
Project 1-10
In this project, students practice using the command-line history capability, by entering four
commands and then recalling two of them.
In Step 6, the command recalled should be who uH.
Project 1-11
In this project, students practice changing the passwords to their user accounts. Consider
Project 1-12
This project is the students’ first introduction to the cat command, as they view the contents of the
/etc/shells file.
In Step 1 student should report the shells on their system, such as any or all of the following
(depending on the UNIX/Linux system):
/bin/sh
/bin/bash
/sbin/nologin
Project 1-13
In this project, students use the more and less commands to view the contents of a large file. When
they use the less command, they experiment with different key options to scroll forward and backward.
Project 1-14
This project enables students to practice using the head and tail commands on the /etc/termcap file.
Project 1-15
page-pf5
5
In this project, students use the redirection symbol to place the contents of the who command into a file
and then they view the contents of the file.
Project 1-16
Discovery Exercises
1. Use the whatis command to determine the purpose of the ls command.
2. Use the man program to find out what the -R option does when used with the date command.
3. Use the man program to determine what other commands you should also see in relation to the
clear command
4. Use the cal command to determine on what day of the week you were born.
5. Use the cal command to determine which year between 2005 and 2010 is a leap year.
6. Clear the screen, and view the online manual to determine how to display today’s date in UTC.
7. Display the current UTC.
8. Create a file called month containing the current month
9. View the contents of the month file you created in Exercise 8.
10. Use the who command to determine the idle time for users currently logged in, but output that
information to a file called users_info. Next view the file you created.
11. View the files, month and users_info, in sequence using only one command-line sequence of
commands
page-pf6
12. View the files month and users_info in sequence by using:
The less command
The more command
13. Create a file called who_info that contains the documentation for the who command. Next, use the
less command to view the who_info file contents and scroll forward and backward through the
information. Then use the tail command to view the final 12 lines of the who_info file. Finally,
use the head command to view the first 12 lines of the who_info file.
14. Create a file called favorite_foods, and list your favorite foods, entering five or six or more. Press
Enter after each favorite food so it appears on its own line (make certain you also press Enter after
the final food item). After the file is created, add two more foods you like that are not on the list
(press Enter after the final food item). View the list of foods to make certain the two items you
added appear at the end of the list.
15. View the documentation for who and then view the documentation for w. How are these
commands similar?.
16. Run the who -uH and w commands using one command-line sequence to compare the results.
17. Determine when the computer you are working on was last booted.
18. Use the command-line history function to determine the most recent two commands you entered.
19. Run the who -H, cal 2009,, and clear commands using one command-line sequence. What do you
end up with on the screen?
20. Use the history function to retrieve the command line you used in Exercise 19. Use the edit
function to remove the word “clear” and replace it with “date.” Next, go to the beginning of “cal”
and delete the text on the line from “cal” to the end. Now, change the -H to -u. Finally, add “; date
-u” so that your final command-line entry is: who -u ; date -u. Execute the command-line entries.
page-pf7

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.