Linked by Thom Holwerda on Mon 17th Apr 2006 11:05 UTC, submitted by Puru Govind
Linux "Many Windows users are familiar with different modes of execution of their operating system: safe mode, command prompt only, safe mode with network support and other such options that are presented during the boot-up process. Similarly, Linux has different modes of executing as well, which are known as runlevels. But unlike Windows, we can change runlevels on a fly. Runlevels control services started by the initialization process. The number of runlevels and services started on those runlevels varies with Linux distributions. Information about the runlevels of a particular distribution is listed in file /etc/inittab."
Order by: Score:
Runlevels on a fly
by weirdnut on Mon 17th Apr 2006 13:15 UTC
weirdnut
Member since:
2006-01-19

>> we can change runlevels on a fly

Oh yeah man, that's mighty cool!

Reply Score: 2

RE: Runlevels on a fly
by markjensen on Mon 17th Apr 2006 14:21 UTC in reply to "Runlevels on a fly"
markjensen Member since:
2005-07-26

"cool"? Not really. But it can be handy - I used singleuser a few months ago to clone over my install to a new drive.

But the article linked-to wasn't about trying to say anything was "cool". It was just a basic listing of modes. It failed to explain what these modes could be used for, so wasn't very good at all.

Also, different systems can use different values - Slack comes to mind.

Reply Score: 1

Good stuff
by weirdnut on Mon 17th Apr 2006 13:19 UTC
weirdnut
Member since:
2006-01-19

Anyway, putting all fun aside, I think it's a nice overview of runlevels on Linux. Kudos to the author for this ;)

(hope I'm not getting beat to death now, just because I thought the typo was funny)

Reply Score: 1

Not enough
by Sphinx on Mon 17th Apr 2006 13:51 UTC
Sphinx
Member since:
2005-07-09

More like dis-information without some mention of System V, almost seems like redhat invented it. No mention of init/shutdown/reboot etc. or how you would even use that knowledge.

Runlevels control services started by the initialization process

is not a sentence or was it meant as a section title?

Reply Score: 1

cool among uncools :-)
by SatyamevJayate on Mon 17th Apr 2006 14:41 UTC
SatyamevJayate
Member since:
2006-04-10

This article is good intro, but lacks details. It isnt cool but coolest among uncools.

osweekly is improving. I want to give full kudos to its editor in chief(though he hasnt written anything yet) and editor.

Reply Score: 1

v Unlike Linux..
by mOOzilla on Mon 17th Apr 2006 14:51 UTC
RE: Unlike Linux..
by Innova on Mon 17th Apr 2006 15:48 UTC in reply to "Unlike Linux.."
Innova Member since:
2005-09-30

when debugging a driver level crash, single user mode in windows is very very handy. Just because most people don't know something exists doesn't make it less important to those that do.

Also, any home/consumer user of linux should care about run levels as they are a necessary piece of knowledge.

I am a home user of OS X, Linux and Windows, and I sure as hell care. Don't overgeneralize.

Reply Score: 1

RE[2]: Unlike Linux..
by mOOzilla on Mon 17th Apr 2006 16:28 UTC in reply to "RE: Unlike Linux.."
mOOzilla Member since:
2006-04-11

You are a techie user not a home user ;) Big difference, home users do not post on OS forums ;)

Reply Score: 2

v Unlike windows..
by mOOzilla on Mon 17th Apr 2006 14:52 UTC
RE: Unlike windows..
by archiesteel on Mon 17th Apr 2006 15:20 UTC in reply to "Unlike windows.."
archiesteel Member since:
2005-07-02

I take it you're unfamiliar with Linux ACLs, which provide the same kind of granularity in file control as in Windows.

2001 called, they want their FUD back. Oh, and please stay on topic.

Reply Score: 2

RE: Unlike windows..
by bigerck on Mon 17th Apr 2006 15:21 UTC in reply to "Unlike windows.."
bigerck Member since:
2005-12-02

Did you checked this ? Do you know this ?

You can do this with Linux also.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/fs-acl.ht...

Reply Score: 1

v Unilike Windows...
by mOOzilla on Mon 17th Apr 2006 14:53 UTC
RE: Unilike Windows...
by DeadFishMan on Mon 17th Apr 2006 18:26 UTC in reply to "Unilike Windows..."
DeadFishMan Member since:
2006-01-09

Are you trying to raise your score or something like that by posting several times what could be consolidated in one single post? :-)

Reply Score: 1

RE[2]: Unilike Windows...
by mOOzilla on Mon 17th Apr 2006 20:22 UTC in reply to "RE: Unilike Windows..."
mOOzilla Member since:
2006-04-11

I post in sepereate posts because EDIT does not work for me on OSNews on FireFox 1.5.0.2, dont you think I would have edited them if I could? I dont give a google for scores on forums.

Reply Score: 0

RE[3]: Unilike Windows...
by Johann Chua on Tue 18th Apr 2006 06:44 UTC in reply to "RE[2]: Unilike Windows..."
Johann Chua Member since:
2005-07-22

Then take your time before posting. Use preview. Lots of short posts from you give the impression that you're spamming the boards.

Reply Score: 1

RE: Unlike windows..
by Dima on Mon 17th Apr 2006 15:24 UTC
Dima
Member since:
2006-04-06

Why does everyone keep complaining about User/Group/Other? If it's not fine-grained for you, then don't use it! Use ACLs instead. Why keep bringing this up?

Reply Score: 2

BSD approach
by ghen on Mon 17th Apr 2006 16:03 UTC
ghen
Member since:
2005-08-31

The BSD approach is much simpler: you have single-user mode and multi-user mode.

Single-user mode is just the kernel + a shell, from which you can do administrative tasks (fsck, backup/restore, ...), and start additional services (networking, ...) individually using the rc.d system.

Multi-user mode is started when quitting the single-user mode shell, or just booting up normally. In multi-user mode, all services enabled in /etc/rc.conf are started. If you want to restart XDM for example, you don't need to switch runlevels, you just do a /etc/rc.d/xdm restart. If you want to disable networking, you do /etc/rc.d/network stop.

Halting and rebooting is done with the shutdown(8) command: "shutdown -h now" (or -p for halt+poweroff) and "shutdown -r now", which properly stop all running services.

Reply Score: 1

RE: BSD approach
by Ookaze on Tue 18th Apr 2006 13:40 UTC in reply to "BSD approach"
Ookaze Member since:
2005-11-14

If you want to restart XDM for example, you don't need to switch runlevels, you just do a /etc/rc.d/xdm restart. If you want to disable networking, you do /etc/rc.d/network stop

Like with most init implementations ...

Anyway, this article is so dumbed down it's wrong at times, even though the author seems to know what he's talking about.
He should have stated he was talking about a SysV or BSD type of init. Because runlevels are not specific to Linux at all, they depend on the "init" process used.
Some init do not even use true runlevels.
It's not true either that su is always called in single user mode. In some setups (like LDAP based, PAM based with some network access), doing this will make your OS unbootable. Sulogin is often used, as you're sure to get the prompt. I think the author made a mistake, as I don't think su will give you the promp without password (unless PAMed to do this), and I don't think su can be used as a login program either. So I think he meant sulogin.
His security problem is bogus too. If you can change the boot sequence at the lilo level, you can as well launch a shell instead of init, and thus get root access as easily.
Everything else he says is dependant on init too (where files are put, format of inittab, ...).

Reply Score: 2

You meant to say Redhat instead of Linux
by stephanem on Mon 17th Apr 2006 17:37 UTC
stephanem
Member since:
2006-01-11

There is no one common method in Linux - redhat's runlevel scripts are different from gentoo's, suse's, ubuntu and slackware.

Tell me where to add a new service?

chkconfig or startsvc or edit /etc/init.d or /etc/rc.3 or boot.local or modules.conf?

Reply Score: 1

rn
by happycamper on Mon 17th Apr 2006 18:16 UTC
happycamper
Member since:
2006-01-01

I would like to know how Debian Linux runlevels operate. I changed Debian's current runlevel to 5, so I would get a CLI login instead of X but nothing changed.

Reply Score: 1

RE: rn
by hustomte on Mon 17th Apr 2006 19:56 UTC in reply to "rn"
hustomte Member since:
2006-01-07

Well, first hit on google was excellent:

http://lists.debian.org/debian-devel/2003/01/msg01898.html

Reply Score: 1

RE[2]: rn
by happycamper on Mon 17th Apr 2006 23:24 UTC in reply to "RE: rn"
happycamper Member since:
2006-01-01

thanks! I meant from current runlevel of 2 to 3 to get login without X. is there is way to disable GDM?

Reply Score: 1

RE[3]: rn
by preater on Tue 18th Apr 2006 23:18 UTC in reply to "RE[2]: rn"
preater Member since:
2005-08-31

The 'correct' way is to use update-rc.d to stop gdm running in (for example) runlevel 3.

It's easier to install sysv-rc-conf (Debian package name) and use that to manage the symlinks instead. Running sysv-rc-conf as root gives you a nice grid of checkboxes showing which services will be started / stopped in each runlevel -- just uncheck gdm in runlevel 3.

sysv-rc-conf can also be used in the style of chkconfig on Red Hat, so something like this is also possible:

# sysv-rc-conf --level 3 gdm off

Section 2.4 of the Debian Reference[1] contains a good overview. Section 9.3 of the Debian Policy Manual[2] is good reading if you are really interested in what goes on under /etc/init.d ;)

[1] http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-boo...
[2] http://www.debian.org/doc/debian-policy/ch-opersys#s-sysvinit

Reply Score: 1

run levels
by Nex6 on Mon 17th Apr 2006 18:33 UTC
Nex6
Member since:
2005-07-06

and with single user u can reset the root password, there is some tricks and stuff you can do to midigate this but still.


id like to see this go away.


-Nex6

Reply Score: 1

RE: run levels
by Dima on Mon 17th Apr 2006 22:57 UTC
Dima
Member since:
2006-04-06

and with single user u can reset the root password, there is some tricks and stuff you can do to midigate this but still.

id like to see this go away.


Also, if you have root access, you can change the password, too, and do lots of other bad things...

What's your point? The only ways to get into single-user mode are to be root, or to have physical access to the computer. In either case, you have enough power already - so single-user mode is not exactly a security hole.

Reply Score: 2

RE: run levels
by Soulbender on Tue 18th Apr 2006 09:46 UTC
Soulbender
Member since:
2005-08-18

"and with single user u can reset the root password, there is some tricks and stuff you can do to midigate this but still."

There's no need to mitigate this, it's the intended behaviour.
If you havent secured the physical access to the machine you have bigger problems than that the root password can be changed.

Reply Score: 1