Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Amen for reading so check all that out, but you also asked for a bit of explanation, so for the Cliff notes version: depending on your distro, there's a set of scripts or set of directories containing links in /etc/rc.d or the like. Runlevel means that these scripts are run. If 0 is set to reboot, 6 to halt, 5 for X, 3 for multiuser, 1 for single-user, etc., those scripts are run to set the machine up for those tasks or modes. So that 5 will start the X server when 3 won't, say, because it's needed for runlevel 5 and not for 3 and is in the scripts for 5 and not 3. t least, that's my understanding.
Sometimes the extended reading can leave me more confused than before, depending on the question I have and the context or simple understanding I may lack. Once I've got *any* handle, the more detailed explanations make more sense. And sometimes I'm in the middle of something and under time pressures so a quick grasp helps. But lotsa reading is always recommended.
Yeah - that's the default runlevel, though - from CLI you can do an 'init 6' or whatever instead of the three-finger salute but you definitely don't want that as default. *g* Unless you just like to watch your computer do loops.
And reading over what I said, I realize at least one thing was off about the way I put it. It's not like '5' means anything. You don't need X for 'runlevel 5' - you need X for a GUI and *if* you want that to be runlevel 5, then the scripts for that runlevel go accordingly. Maybe a minor difference, but just pointing out that different distro's runlevels are set up different ways and the number doesn't mean anything but what it's configured to mean.
edit - the file's inittab, btw. or usually is, anyway. I think it always is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.