Wells, Guide to Linux Installation & Administration, 2E 0 ...
Guide to Linux Installation and Administration, 2e
Chapter 6 Solutions
Review Questions
1. The default shell used by Linux is
b. The Bourne Again Shell (bash)
2. When logged in as root, the shell prompt normally changes to display:
b. A # character
3. The main function of a shell is to:
d. Launch programs
4. Name four different shells and briefly describe the differences between them.
bash, C, TC, korn, public domain korn, Z—Table 6-1 contains details of the differences between them.
5. Tab completion is useful when you need to:
c. Enter long filenames or directory names at the shell prompt
6. The history command is used to
a. Display a list of previously entered commands
7. Entering the command !fr would do the following in the bash shell:
b. Execute the most recently executed command that began with fr
8. To have a command executed each time any user logged in to the Linux system, you would place the command in which one of these files:
a./etc/profile
9. If a .bashrc file is found in a user’s home directory, the systemwide /etc/bashrc script is not executed.
False
10. If a directory contains the filenames micron and microscope, and you enter micro and press Tab once, what happens?
c.The shell beeps.
11. Describe the difference between an alias and a symbolic link.
An alias defines a string that the shell will substitute when a specific string is entered. A symbolic link is a pointer in the file system in which one filename refers to another filename.
12. Which of the following is a correctly formed alias for executing the mv command?
d. alias ren="mv -i"
13. Which command is used to create a symbolic link?
b. ln
14. The command echo $HOME will display:
c. The value of the HOME environment variable
15. Describe the contents of the PATH environment variable.
It holds directory names that the shell searches whenever it tries to execute a program name entered at the shell prompt.
16. When the export command is used, an environment variable
a. Will be available to other programs launched in the same shell where export was executed.
17. Name at least three nongraphical text editors that may be included with a Linux distribution.
vi, emacs, joe, and pico and mentioned in the text; there are many others that users might be familiar with from exploring Linux download sites.
18. Knowledge of the vi editor is considered an essential skill because:
b. The vi editor is virtually always available to complete system administration tasks.
19. Suppose you enter the command vi file1 and then press the following keys. Describe the result.
itestyyp:wq
The file named file1 is created. It contains two lines of text, each line with the text “test”
20. Man pages in Linux are created using a markup language that is a derivative of:
b. roff
21. Describe the difference between a WYSIWYG program and a document containing markup codes.
WYSIWYG programs hide formatting codes, displaying their effect; markup codes show the formatting instructions rather than their effect and may require another program or a paper copy to show their results.
22. X Uses ____ to supply font information to graphical applications.
c. a font server, xfs
23. Fonts for the X Window System are normally stored in which directory?
d. /usr/X11R6/lib/X11/fonts
24. The wc command displays
The number of lines, words, and characters in a file
25. Name five programs that can be used to filter text files in Linux.
See table 6-6, also sed, awk, perl, sort and others
Hands-on Projects
[pic] Project 6-1
13. Enter the command !ls to execute the most recently used ls command, which you entered in Step 11. Why does the command display an error now?
Because the current working directory has changed and the requested file does not exist in your home directory.
19. Enter the command export PS1="\d$PS1". What happened? What does the $PS1 at the end of the command indicate?
It copies the current value of the variable into the new assignment, so effectively the new value of PS1 is the old value prefixed by \d.
20. Enter the command bash to start a new shell. How does the shell prompt change? Why?
The new value of PS1 was used by the shell that was started within the current shell.
21. Enter the exit command to leave the new shell you started in Step 20. How does the shell prompt change? Can you explain this?
The prompt changes back to its former style because the PS1 variable associated with the original shell has not had a chance to change—it hasn’t been re-initialized.
[pic] Project 6-3
8. Explore the buttons and drop-down lists provided in xfontsel. How do the categories listed on the drop-down lists correspond to the fields in the font listing you saw in Step 6?
The same information is in the fields of the font listing in Step 6 as appears on the drop-down list labels.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- guide to mutual fund investing
- nature communications guide to authors
- girlfriends guide to divorce characters
- guide to idaho labor laws
- walking guide to rome
- beginners guide to the stock market
- cdc guide to infection prevention
- beginners guide to mutual funds
- guide to choosing a major
- guide to infection prevention for outpatient settings
- beginners guide to excel 2016
- beginners guide to stocks