11 Answers to Exercises
- What is free software? List three characteristics of free software.
“Free software” is a matter of liberty, not price. To understand the concept, you should think of “free” as in “free speech,” not as in “free beer .” —Richard Stallman (page 2) Four freedoms characterize free softwar e
(www.gnu.org/philosophy/free-sw.html):
a.The freedom to run the program for any purpose (freedom 0).b.The freedom to study how the program works and to adapt it to yo ur needs (freedom 1). Access to the source code is a precondition for this freedom.c.The freedom to redistribute copies so you can help your neighbor (free- dom 2).d.The freedom to improve the program and to release your improvements to the public so that the entire community benefits (freedom 3). Access to the source code is a precondition for this freedom.
- Why is Linux popular? Why is it popular in academia?
Linux is portable, is based on standards, is written in C, has a kernel pro- gramming interface, can support many users, and can run multiple tasks simultaneously. For more information refer to “What Is So Good About Linux?” on page 6.The source code for the operating system is readily available so students can understand more easily how Linux works and can modify the code furthe r to understand its operation and change the way it works. For more infor- mation refer to “The Code Is Free” on page 5.1 A Practical Guide to Linux Commands, Editors, and Shell Programming 3e Mark Sobell (Solutions Manual All Chapters, 100% Original Verified, A+ Grade) 1 / 4
2
- What are multiuser systems? Why are they successful?
- What is the Free Software Foundation/GNU? What is Linux? Which parts
- In which language is Linux written? What does the language have to do
- What is a utility program?
- What is a shell? How does it work with the kernel? With the user?
Multiuser systems divide computer resources among multiple users, allow- ing for more efficient use of these resources. They are more cost-effective than single-user operating systems. Refer to “Linux Can Support Many Users” on page 12.
of the Linux operating system did each provide? Who else has helped build and refine this operating system?The Free Software Foundation (www.fsf.org) is the principal organizational sponsor of the GNU Project. GNU developed many of the tools, including the C compiler, that are part of the Linux operating system.Linux is the name of the operating system kernel developed by Linus Tor- valds, which has since been expanded and improved by thousands of people on the Internet.Torvalds’ kernel and GNU’s tools work together as the Linux operating system.
with the success of Linux?Most of Linux is written in the C programming language. When written in a portable style, C programs can be moved from one platform (processor- or CPU-based system) to another by simply recompiling the code. Portabil- ity means that manufacturers have a ready supply of software, operating systems, and applications when they modify an existing platform or develop a new one.
A utility (program), sometimes referred to as a command, performs a task that is frequently related to the operating system. A utility is simpler than an application program, although no clear line separates the two. Linux dis- tributions include many utilities. You can also download many utilities from the Internet.Examples of utilities are cp (copies a file), ls (lists information about files), ssh (securely connects to a remote computer), and df (lists information about free space on system devices such as hard disks).
A shell is a command interpreter; it starts the program you call from a com- mand line and passes your instructions (arguments) to the program. The shell is also a programming language; it can run files of commands, similar to DOS batch files, when you issue a single command to the shell. 2 / 4
3 When you use a shell in interactive mode (from a command line), the kernel accepts input from your terminal (by default) and passes it to the shell. It also takes output from the shell and displays it on the screen (by default).The shell accepts a command from a user, starts execution of the program named in a command, and passes the command line to the program.
- How can you use utility programs and a shell to create your own
- Why is the Linux filesystem referred to as hierarchical?
- What is the difference between a multiuser and a multitasking system?
- Give an example of when you would want to use a multitasking system.
applications?You can write a shell script, also called a shell program, or a batch file under DOS. A shell script is one or more command lines contained in a file. Make the file executable and give the name of the file as a command. The shell then executes the commands in the file as though you had typed each com- mand individually. (You might need to give the command as ./command.)
The Linux filesystem is a hierarchy in which the root directory appears at the top of the system and branches come off the root, with each branch sup- porting one or more plain or directory files.
A multiuser system can support more than one user at a time.A multitasking system can process more than one task at a time.
Multitasking is required in the following scenarios:
a.You want to run two programs at the same time. For example, you want to print a report while you are working on something else.b.More than one person is using the system, each running a separate process.c.You want to run a graphical user interface (GUI). Each window you open runs a separate process.
- Approximately how many people wrote Linux? Why is this project unique?
- What are the key terms of the GNU General Public License?
Many thousands of people have contributed to the Linux operating system using the Internet. This project is unique because a project of this magni- tude, using free software, had never been attempted before.
The GPL says that you have the right to copy, modify, and redistribute the code covered by the agreement. However, when you redistribute the code, you must also distribute an equivalent license with the code, making the code and the license inseparable. 3 / 4
11 Answers to Exercises
- The following message is displayed when you attempt to log in with an
incorrect username or an incorrect password:
Login incorrect This message does not indicate whether your username, your password, or both are invalid. Why does it not tell you this information?If the system were to say that a password that someone entered was incor- rect, it would be saying that the username was valid. This information could be used by a cracker to help break into the system. Saying that a password is valid for an invalid username does not make sense, but saying that a pass- word is valid on the system could help a cracker in the same manner.
- Give three examples of poor password choices. What is wrong with each?
Include one that is too short. Give the error message the system displays.
Examples of poor password choices follow:
finger word in the dictionary tom login name aqbfgyadoes not contain a number 5q too short
- Is fido an acceptable password? Give several reasons why or why not.
- What would you do if you could not log in?
- / 4
This password is not acceptable because it is too short, is a common pet name, and does not contain a number.
Make sure your username and password are valid. Usernames and pass- words are case sensitive. Check with the system administrator. If possible, look in the /etc/password file to check the spelling of your username. Assign yourself a new password if you are the system administrator. Make sure you are logging in on the right system.