< Changing the runlevel >
The /etc/inittab
file is usually commented well, so the file itself explains what the lines in the file mean. Look for a line like this:
id:3:initdefault:
The line is usually at the beginning of the /etc/inittab
file, and the number doesn't necessarily have to be 3. The number in that line tells what's the default runlevel of your system. The default runlevel in turn specifies what processes are started when your Linux system boots up. So, you need to change the number that indicates your default runlevel in order to specify if you want to start the X Windows when your Linux system boots up.
The number of the runlevel that starts X isn't always the same in all Linux distros. That's why you'll have to read the /etc/inittab
file a bit more. It explains what number and what runlevel is used for graphical and text login. If you want to boot to X Windows, you'll choose a "full multiuser with xdm" or "full multiuser with graphical login" or something similar. If you want to boot to the command line, you'll choose a runlevel that says something like "full multiuser" or "full multiuser with text login" or "full multiuser with no graphical login" or something like that.
In Red Hat (and maybe in other Red Hat based distros, too) the runlevel for booting to X Windows is 5, and for a text login it's 3 by default. This is the case in newer versions of SuSE, too. In older SuSE's it was 2 for a text login, and 3 for a graphical login. So, for example, if you want a graphical login in a Red Hat based distro, you'll change
id:3:initdefault:
to
id:5:initdefault:
However, check out your inittab
file to see what's the number of the runlevel in your distro, and then replace the number in the line to indicate the runlevel you want. Then save the changes, and tada: you're done!