Link to home
Start Free TrialLog in
Avatar of nabinman
nabinman

asked on

linux automatically starts in x-window mode

When I start my linux, it does not start in terminal mode and automatically goes to gnome. How can start in terminal mode.
Avatar of gruse
gruse

Linux (or UNIX in general) has so called run levels, which define certain modes of operation for the OS. Traditionally, 6 run levels are used, but only a few are well defined:

0 Shutdown and Halt (Power off, if possible)

1 Single User Mode, a maintenance mode. System is up and running, but only root can log in at the console. No services like networking or printing.

2-5 Multiuser Mode. "Normal" users can log in, elementary services are available.

6 Shutdown and Reboot.

Run levels 2, 3, 4, 5 are not well defined. On a Red Hat Linux, 2 has no  networking, 3 has networking and 5 has X (graphical login screen) and networking. RedHat-based distributions like Mandrake use the same scheme, but other Linux distributions (not to mention other UNIXes) may use other run level definitions.

Your default runlevel is defined in a file called /etc/inittab. BE CAREFUL IF YOU EDIT THIS FILE. Sorry for shouting, but typos in this file can prevent your system from booting. There's a line that reads

id:5:initdefault:

The first two characters may be different. This line says that your default runlevel is 5, on a RedHat system that means that you'll get a graphical login screen. If you change the value in the second field to 3, it'll boot without that login screen.

If you have difficulties determining which runlevel to use, tell me wich distribution you are using.

You can change the runlevel of your Linux system on the fly, using the command init. If you type

init 3

it'll go to runlevel 3, closing your GUI.

If that's too complicated for you (for now), you can simply change to a virtual console and keep your GUI running. From your GUI, type CTRL-ALT-F1, and you switch to a character console. Your GUI typically resides von console 7, so typing CTRL-ALT-F7 takes you back.

Hope that helped!
Just a correction: Runlevels 0 to 6 are
*seven* runlevels that are traditionally used. Argh...
I think what you recommend is fundamentally a bad idea for a novice on any system except RedHat.  If you want to boot only into console mode, you need to find and remove xdm or gdm.

What distribution are you running?
ASKER CERTIFIED SOLUTION
Avatar of nikoftime
nikoftime

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nabinman

ASKER

sorry for the delay in replying but I forgot to mention when i boot in linux mode it goes directly to gnome and hangs at the login prompt and hence I wasn't able to do any of above. more help requested.
Please try to login to single user mode (Level:1) when your Linux starting (i.e. LILO), you may able to use the console and maintain it.