Re: command line only run level?
On Wednesday 17 August 2005 06:01, Craig Hagerman wrote:
> Hi,
>
> I am planning on setting up a headless file server using debian on an
> AMD64 system. I just realized that (unlike other distros I have used)
> Debian doesn't have a default run level for command line only (no GUI
> interface). Why is this?
>
> My question is how to set up Debian so that I DO have init 3 being
> command line only?
>
> Craig
Dead easy. In /etc/ you have directories rcS.d, rc0.d, rc1.d and so on up to
rc6.d. In each of these directories are a set of symbolic links with names
like "S20sendmail" or "K01kdm", linked to an appropriate start/stop script in
init.d. What init does when changing to a new runlevel is, it goes through
the appropriate rc_.d for the runlevel and calls every K* link {K for Kill}
with the parameter "stop", and every S* {S for Start} link with the
parameter "start". They get resolved automatically into ascending numerical
order, just due to shell behaviour.
The graphical user interface is started by a display manager -- xdm, gdm or
kdm according to your personal preference. So you need to find the S__ link
in /etc/rc3.d which points to your display manager {mine is S99kdm} and
rename it to a K__ link. And you probably will want to renumber it while
you're at it, since you want the display manager to stop fairly early on in
switching runlevels.
Although some distributions {*cough* red hat *cough*} define as a matter of
policy what each runlevel should be used for, Debian put every service into
every multi-user runlevel {2, 3, 4 and 5} by default and let the user
decide what to do with each one. There is a line in /etc/inittab which reads
something like "id:2:initdefault:" which sets the default runlevel. Just
change this if you want to start in something other than 2.
--
AJS
Reply to: