Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
Changing Linux run levels
Purpose
Resolution
To change the run level of a Linux operating system:
Note: If the run level is being changed to troubleshoot a problem with the operating system or an application, following this procedure may remove a software environment that is required to test the health of your operating system.
Note: If the run level is being changed to troubleshoot a problem with the operating system or an application, following this procedure may remove a software environment that is required to test the health of your operating system.
-
Ensure that you are logged in as a user with root privileges.
-
Edit the file /etc/inittab in the text editor of your choice.
Note: To perform this from a shell prompt using the VI text editor, refer to the Additional Information section at the end of this document.
-
Look for the line of text id:X:initdefault: where X is replaced by a number. This number represents the default Linux run level.
-
Edit the line of text and replace X with the run level you want to change to:
1 Single User Mode 3 Full multiuser 5 X-Windows (X11)
Note: The above is a list of run levels that are generally used. If the full list is not displayed at the top of the inittab file and you need to change to a level not listed, refer to the manual for your distribution of Linux.
Warning: Do not set X to 0 or 6.
-
Save the edited file.
-
Reboot the operating system.
Note: Linux boots into the new run level each time it is started. To return it to its former behavior, repeat steps 1-6 and edit the file to use the original value of X .
Note: It is possible to change the run level without rebooting the operating system and without affecting the run level the operating system defaults to when it is started:
-
Type init X and press Enter, where X is replaced by the run level you want to change to.
Note: If this command does not work, refer to the manual for your distribution of Linux.
Caution: This command exits all running applications. Save all work before entering this command.
Additional Information
Editing the /etc/inittab file from a shell prompt using the VI text editor:
-
Open a shell prompt. For more information, see Opening a command or shell prompt (1003892).
-
Type cd /etc and press Enter.
-
Type vi inittab and press Enter.
-
Type /id: and press Enter.
- Press the right arrow key three times.
- Type r .
- Type the number of the run level you want to change to.
- Type :x and press Enter.
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.
Actions
- KB Article:
- Updated:
- Categories:
- Product Family:
- Products:
- Product Versions:

