Change default boot up runlevel Linux Fedora and edit inittab configuration file
Change default boot up runlevel for Linux Fedora using inittab configuration file
Change the default boot up runlevel from GUI (Graphical user interface) to text base user interface on Linux Fedora 9. This step by step article is design to make user to batter understanding the implementation of runlevel and inittab setting in Linux Fedora system. For Linux Fedora 9 the inittab configurations file is only use by upstart for the default runlevel only, other configuration and setting that use to be in the inittab configuration file is now located in /etc/event.d/ directory.
1. Log in as root user.
login as: root
root@172.16.166.51's password:
Last login: Thu Aug 7 19:50:22 2008 from 172.16.166.60
View inittab configuration file
2. View the inittab configuration file that located under /etc directory using cat command.
[root@fedora9 ~]# cat /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/event.d/rcS
#
# Individual runlevels are started by /etc/event.d/rc[0-6]
#
# Ctrl-Alt-Delete is handled by /etc/event.d/control-alt-delete
#
# Terminal gettys (tty[1-6]) are handled by /etc/event.d/tty[1-6] and
# /etc/event.d/serial
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(8), initctl(8), and events(5).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
[root@fedora9 ~]#
Backup inittab configuration file
3. Best practice: Before make any changes to the any configuration file in the system.. Backup the configuration file first. The command example below show that we use the most simple backup system… copy file…. Copy the inittab configuration file, and name the backup file to inittab.bak or better yet… name the backup file and put the backup date on the filename e.g. inittab-08-08-08.bak.
[root@fedora9 ~]# cp -pr /etc/inittab /etc/inittab.bak
[root@fedora9 ~]#
Edit inittab configuration file
5. Use your best choice of editor.. The example below, use vi / vim editor to edit the inittab configuration file.
[root@fedora9 ~]# vi /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/event.d/rcS
#
# Individual runlevels are started by /etc/event.d/rc[0-6]
#
# Ctrl-Alt-Delete is handled by /etc/event.d/control-alt-delete
#
# Terminal gettys (tty[1-6]) are handled by /etc/event.d/tty[1-6] and
# /etc/event.d/serial
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(8), initctl(8), and events(5).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
"/etc/inittab" 26L, 853C
6. Push ‘i’ key to start the vi insert mode... watch for the --Insert-- label down the vi screen
7. Go to line that have id:5:initdefault: then
8. Change the number 5 to number 3 . The line should be look like id:3:initdefault: .
9. Hit Esc key 2 times… to exit vi editing mode...
10. Push and hold down the Shift key, and then hit z + z (2 times z key) to save the inittab configuration file.
Test run new initdefault configuration setting
Reboot to test you new inittab configuration, use telinit 6 to change to runlevel 6 - reboot Linux fedora system.... after the computer rebooted... you should get text base login screen
[root@fedora9 ~]# telinit 6 <-- Reboot / restart your Linux machine
How to enter or go from text base screen to GUI - Graphical screen???
To get the GUI - Graphical screen back
1. Use the ctrl + alt + f7 key if your X11 server is up
2. if no X11 up, use X, startx, telinit 5 or init 5 command to start the GUI
3. or... Edit inittab configuration file again... change the default run level to 5 id:5:initdefault... then reboot....
Note: The inittab file display the configuration example that you can use. Make sure that you read the configuration file first… do not set the init default to runlevel 0 and 6… if you put the default runlevel to 0 and 6 your Linux system may keep rebooting or keep shutdown when you try to power on the system.
Keywords: inittab, fedora runlevel, change runlevel, inittab configuration file, inittab runlevel, linux runlevel, fedora upstart, linux fedora upstart
- 28925 reads
- Email this page
Recent comments
8 years 52 weeks ago
9 years 3 weeks ago
9 years 16 weeks ago
9 years 22 weeks ago
9 years 32 weeks ago
9 years 35 weeks ago
9 years 43 weeks ago
9 years 50 weeks ago
10 years 2 weeks ago
10 years 7 weeks ago