Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

376 Chapter 11 Study Guide

Scenarios

1.Your users are having problems being able to resolve names on the network. You suspect that the DNS server is not working, but when you check the running processes, it seems to be alive. What steps should you take to fix the problem?

2.You have just installed a new Linux system on your server. Unfortunately, it boots into X windows automatically, and you need the server to boot only to the command line interface. What steps should you take to fix the problem?

Lab Exercises

Lab 11-1 Runlevels and system shutdown

The objective for this hands-on lab is to gain experience in exploring different runlevels and how to properly shutdown a Linux system. You should be able to use any default Linux installation for this exercise.

1.Login as the root user on your system.

2.Enter the following command: reboot

This should instantly reboot the system.

3.When the system comes back up, login as root again, and enter the following command:

shutdown -r now.

The system should perform the same function as in Step 2 and reboot.

4.When the system comes back up, login as root again, and enter the following command:

init 6.

The system should perform the same function as in Step 2 and reboot.

5.When the system comes back up, login as root again, and enter the key sequence: Crtl-Alt-Delete.The system should perform the same function as in Step 2 and reboot. Each of the last four commands (Steps 2-5) performed the exact same function.

6.When the system comes back up, login as root again, and enter the following command:

init 0

The system will shutdown and come to a halt without rebooting.

Chapter 11 Study Guide 377

7.When the system comes back up, login as root again, and enter the following command:

halt

The system will shutdown and come to a halt without rebooting.

8.When the system comes back up, login as root again, and enter the following command:

shutdown -h now

The system will shutdown and come to a halt without rebooting. The last three commands (Steps 6-8) perform the same function.

Lab 11-2 Using the vi editor

The objective for this lab is to open and edit a simple text file using the vi editor.

1.Start the vi editor and edit a blank file called, text.txt. Use the following command:

vi text.txt

2.Enter the letter i to begin insert mode, and type the following sentence:

This is a test of the vi editor.

3.Hit Enter and then on the next line type the following sentence:

This is the second line of the test.

4.Hit Escape to enter command mode, and use the cursor keys to move the cursor on top of the first letter of the word second. Type the letters dw to delete the entire word.

5.Enter the letter i to begin insert mode again, and type the word second. After you finish, hit the Escape key to enter command mode.

6.Enter the letter o to begin inserting text on the next line.

7.Enter the following sentence:

This is the third line of the test.

8.Hit Escape and the :wq to save your file.

9.Enter the following command to see your edited file: cat test.txt

Соседние файлы в предмете Операционные системы