Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I searched a lot but can't get any solution. My question is what file in Ubuntu is equivalent to /etc/inittab file in RedHat. In RedHat /etc/inittab file contains the setting related to runlevel in which you want to boot the linux.

share|improve this question

3 Answers 3

up vote 6 down vote accepted

Ubuntu uses Upstart, an alternative to sysvinit, which works completely differently. The Upstart CookBook discusses runlevels and how to work with them.

Generally, though, the RedHat concept of runlevels isn't used on Debian or derivatives, including Ubuntu; they have only "single user" or "everything running", without any of the "network, but not graphics" style distinctions that RedHat draws.

share|improve this answer

As mentioned Ubuntu does now use Upstart.

The /etc/inittab and the scripts from /etc/init.d or /etc/rc.d/* have been incorporated into several scripts in the /etc/init directory or /etc/event.d (for older versions of Upstart).

Look for the item you want to modify to have a script in that directory, (serviceX) /etc/init/serviceX.conf and modify it accordingly. You can find the syntax and additional information online.

However, if you need to run a program that depends on SysV Upstart has a compatibility mode. Programs that still use /etc/rc.d/* can put scripts in there and have them still run.

As I was looking at the scripts in /etc/init, there was one named rc-sysinit.conf - and it provides the ability to parse the /etc/inittab and determine the default runlevel from this file should you add one.

share|improve this answer

If you want to change the default-runlevel of your Ubuntu system and looking for the /etc/inittab go change it and see that Ubuntu lacks it, don't worry(!), to do so you you can create inittab file in /etc directory and write only the following line on it:

id:3:initdefault:

(you can change "3" to your intended default rullevel)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.