pavement

Runlevels

From FreeBSDwiki
Revision as of 05:21, 14 June 2007 by 66.131.251.84 (Talk)
Jump to: navigation, search

What's different?

Linux runlevels define what services are available -- networking, GUI, etc. BSD runlevels define the system state -- what may be written or changed, kernel security, single user for fixing serious problems, etc. As such, BSD runlevels are used mostly for securing a server that's static (ie, once you've set everything up and nothing will need to be changed, you can bring the runlevel to 3 and no firewall rules or files will be changeable.) See man init.

So how do I start stuff automagically?

Linux startup scripts usually live in /etc/init.d/rc.X/ where the X is the particular runlevel. BSD runlevels don't have this granularity for different services starting in different system states -- it's on or it's off, there's no dimmer switch. BSD startup scripts usually live in /etc/rc.d/ or /usr/local/etc/rc.d/ and they'll usually take the same form of commands as their linux siblings:

samizdata# /etc/rc.d/named start

on a BSD box will start up BIND DNS services, assuming the script is there and fully functional (which since it's the base system, it should be).

Certain services can be started automatically by placing certain entries in the /etc/rc.conf file -- do a man rc.conf if you want to see what you can put in there.

Editorial -- why I think the BSD and Linux runlevels are different.

Linux and BSD runlevels are vastly different, in part because of historical reasons (see SysV and BSD) and in part because of the very nature of BSD and Linux's origins. BSD started as a bunch of add-ons to AT

Personal tools