Harley Hahn's Guide to
|
A Personal Note
Chapters...
Command
INSTRUCTOR |
Exercises and Answers for Chapter 6... The Unix Work Environment Review Question #1: What is a time slice? What is a typical length for a time slice? Answer A time slice is a very short interval during which a particular process is allowed to use the processor. A typical time slice would be 10 milliseconds (10 thousandths of a second). Review Question #2: What is the Unix CLI? What is the GUI? Answer CLI is an abbreviation for "command line interface", a text-based interface in which the user types commands that are interpreted by the shell. GUI is an abbreviation for "graphical user interface"; pronounced either "gooey" or as three separate letters "G-U-I". A GUI enables a user to interact with a computer by using a pointing device (mouse, trackball, pad, pointer) and a keyboard to manipulate windows, icons, menus and other graphical elements. Review Question #3: What is a runlevel? At this very moment, Fester Bestertester is sitting at the back of a lecture hall listening to a boring lecture on animal husbandry. To keep himself awake, Fester is playing a GUI-based game on his Linux laptop. What is the runlevel on Fester's computer? Across the campus, a Unix system administrator has brought down the system and rebooted, so he can solve an important hardware problem. What is the runlevel on the admin's computer? Answer A runlevel is one of a small number of modes in which Unix can be run. The runlevel determines which fundamental services are to be provided. More technically, a runlevel is a system software configuration that allows a specified group of processes to exist. When Fester Bestertester uses a GUI on his Linux system, the runlevel is #5 (Multiuser mode: GUI). When the Unix admin has rebooted the system to solve an important hardware problem, the runlevel is #1 (Single-user mode: command line). Review Question #4: Which person acts as superuser on your particular Unix system? Answer If your have your own Unix or Linux system, you are the admin, which means that, when necessary, you must become superuser. If you use a shared system, someone else acts as superuser. You will have to ask around to find that person. One way to reach the superuser is to send email to userid root. Review Question #5: What is a virtual console? How do you switch from one virtual console to another? Answer A virtual console is a terminal emulation program that supports an independent work session. Within Linux, the most common default configuration offers the user 7 virtual consoles: #1-6 are full-screen, text- based terminals for using a CLI; #7 is a graphics terminal for running a GUI. In such systems, the desktop environment (such as KDE or Gnome) runs within virtual console #7. On a Linux system, you switch from one virtual console to another, by pressing a special key combination. For virtual console #1, press <Ctrl-Alt-F1>. For console #2, press <Ctrl-Alt-F2>; for console #3, <Ctrl-Alt-F3>; and so on. To switch to the your GUI (your desktop environment), press <Ctrl-Alt-F7>. (Remember, the 7th virtual console is the graphics terminal.) If you are using a text-based virtual console, you can leave out the <Ctrl> key. For example, from virtual console #1, you can switch to virtual console #4 by pressing <Alt-F4>. Applying Your Knowledge #1: The who command (which we will discuss in Chapter 8), displays a list of all the userids that are currently logged into the system. If a userid is logged in more than once, who will show that. Log in on each of your virtual consoles, one by one. Then switch to your GUI, open a terminal window, and enter the who command. What do you see? Answer Sample output:
harley tty1 2008-01-31 15:58
Applying Your Knowledge #2: Being able to switch from one desktop to another and being able to copy and paste quickly are important skills. Within your GUI, open two terminal windows, each in its own desktop. In the first desktop, enter the command date (to display the time and date) into the terminal window. Copy that command into the clipboard. Now change to the second desktop and paste the command into the other terminal window. Now repeat the exercise using two text-based virtual consoles. Which set of copy and paste procedures is more comfortable to you? Why? Answer When using the GUI:
• Copy: select text with mouse
When using a text-based virtual terminal:
• Copy: select text with mouse
Within GUI-based programs:
• Copy: select text, then press ^C
If you are used to Microsoft Windows, you will find ^C and ^V more familiar. However, once you get used to using the mouse for these operations, you will find it a lot easier. For Further Thought #1: Some Linux distributions are set up so that a root userid is not created during the installation process. In such cases, your regular password serves as the superuser password. Why would a distribution be set up in this way? What are the advantages? What are the disadvantages? Answer Some distributions are created primarily for non-technical users. In such cases, it can be safer to not create a superuser account by default. When permission is needed for a restricted operation, the system will prompt the user to enter the superuser password. (This is the case with Ubuntu.) Such an arrangement maintains security without requiring the user to know how to log in and out as superuser. The advantages of such a system is that it is simple and safe. The disadvantage is that a technically knowledgeable user will find the system stifling. For Further Thought #2: Why do so many people believe they can think about more than one thing at a time? What effect do fast, multitasking computer systems like Unix have on such beliefs? Is this healthy or unhealthy? Do you, personally, think it is okay to talk on the phone or text message while you are driving? What about when other people do it? Answer Many people believe they can think about more than one thing at the same time, because they have often engaged in activities that allow them to lower their concentration for a moment. This creates the illusion that they are actually paying attention to more than one activity at the same time. A fast, multitasking computer system (like Unix) encourages this false belief for two reasons. First, the computer can pick up the slack when the user's attention moves elsewhere. Second, some activities (such as IMing) have a natural lag, which allows the user's concentration to drop momentarily without a noticeable penalty. Such beliefs are unhealthy. Because they feel true — even though they are not — they encourage people to participate in activities (such as online video gaming) that, in the long run, prove troublesome to human beings, especially to young people whose brains are still developing. Moreover, putting yourself in the position where you need to think about more than one thing at a time can be dangerous if you are working with forces beyond your control, for example: driving a car, operating machinery, or trying to IM two girlfriends at the same time. When people are driving, it is wrong for them to engage any any other activity that requires concentration for more than a brief instant. This includes talking on a phone, text messaging, checking for messages of any type, reading, applying makeup, or having any but the simplest, unemotional conversations with the other people in the car. When others engage in such activities while they are driving, they are endangering themselves, their passengers, and the other people on the road. Even though a lot of people do this and seem to get away with it, it is wrong and foolish. Exercises: Introduction | Chapter list
© All contents Copyright 2024, Harley Hahn
|