The systems need to boot up automatically into text mode instead of the GUI mode.. The systems resources need to be used for other things besides running the X Window GUI.. This task can
Trang 11 - 2 IT Essentials II v2.0 - Lab 10.3.5 Copyright 2002, Cisco Systems, Inc
Lab 10.3.5: Managing Runlevels
Estimated Time: 20 minutes
Objective
The student will understand the concepts and purposes that the Runlevels play in a Linux environment
Equipment
• A computer with Linux Red Hat 7.X installed
Scenario
The system administrator of a large company is responsible for a group of Linux servers whose resources need to be given to the incoming user requests The systems need to boot up automatically into text mode instead of the GUI mode The systems resources need to be used for other things besides running the X Window GUI This task can be accomplished by permanently changing the default runlevel
Procedures
Note: Log in as the root user prior to starting this lab
Step 1: Manually change the Runlevel
Manually change the runlevel using the following steps:
1 Make sure that the system is booted up correctly and that the X Window GUI is running
2 Open a terminal window and type init 3 or /sbin/init 3 at the command prompt The system should exit the GUI mode and take a few seconds to
terminate some running processes Then, the system will enter text mode
3 Once the login prompt appears, log back in as the root user
4 When successfully logged in, type init 5 or /sbin/init 5 at the shell prompt
5 The GUI login interface will now load Log in to the X Window session again with the root account
At this point, the runlevel has been successfully changed
Trang 22 - 2 IT Essentials II v2.0 - Lab 10.3.5 Copyright 2002, Cisco Systems, Inc
Step 2: Permanently Changing the Runlevel
It is a simple process to permanently change the default runlevel on a Linux system:
1 Open a terminal window, then open the /etc/inittab file with the vi editor To
do this enter vi /etc/inittab at the shell prompt.Read over this file It contains a lot of useful information regarding the system configuration
2 Change the default runlevel manually so the system will automatically start in text mode instead of GUI mode To permanently change the default runlevel, change the id:5:initdefault: line to id:3:initdefault:
3 Save this edit To save, press the Esc key on the keyboard, then type :wq and
press Enter This should return the system to a shell prompt
4 Remember that there may be other labs to do after this one Repeat steps 1 – 3 and change the runlevel back to 5 instead of 3
Reflection
Are there any other situations where permanently changing the default runlevel could be
an advantage? Is it possible to have certain programs start at different runlevels?