Вы находитесь на странице: 1из 4

Seng Vue NST-IOT 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 cant 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? Answer: b. cat > Meeting

2. Before you make the note in Question 1, you decide to determine Fridays date, so that you can include it in your note. What Linux command can you use to quickly determine the Fridays date? Answer: a. cal

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? Answer: a. Ctrl+b

4. You havent changed your user account password for several months and now decide to create a new password. Which of the following commands should you use? Answer: d. passwd

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? Answer: c. man cat 6. Which of the following is the UNIX distribution originally developed through AT&T Bell Labs? Answer: d. System V

7. Which shell is used by Linux as the default command interpreter? Answer: a. Bash shell

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? Answer: c. cat >> Annual_Report

9. SSH can be used to ___________________. Answer: b. log in remotely to another computer on a network

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? Answer: d. the administrative account that has complete access to a UNIX/Linux system

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? Answer: c. tail -n 2 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.) Answer: a. q

13. Which of the following are examples of Linux distributions? (Choose all that apply.) Answer: a. SUSE Linux Enterprise, b. Mandriva, c. Fedora, and d. Red Hat Enterprise Linux

14. Which of the following commands enable you to view the contents of a file? (Choose all that apply.) Answer: a. less and b. cat

15. When you enter the who command, what information do you see? (Choose

all that apply.) Answer: a. the users on the local system

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? Answer: d. clear

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? Answer: d. Use a GUI menu option to log out or enter an appropriate command for the shell you are using, such as exit or logout (if there is no GUI desktop in use).

18. You work at a law firm with eight other people. All of the eight computers on the firms network use wireless connections to communicate with one another without a server. This is an example of which of the following? Answer: b. a peer-to-peer network

19. On which of the following types of computers might you find a UNIX or Linux operating system? (Choose all that apply.) Answer: a. a mainframe computer, b. a desktop PC, c. a server, and d. a workstation for scientific research

20. Youre 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? Answer: c. Press the up arrow key one time.

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? Answer: b. date -u

22. How would you describe the purpose of the more command?

Answer: The more command enables you to view a files contents by scrolling down.

23.

What is the purpose of Telnet? Answer: Telnet can be used to connect a UNIX , Linux, or Windows PC to a remote computer.

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. Answer: UNIX and Linux are case sensitive, so to display a calendar you must use the cal command and not Cal.

25. Explain how you can run more than one command on a single command line. Answer: To run more than one command on a single line, use the : (semicolon) character to separate each command.

Вам также может понравиться