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 don't have a service in my run level that starts the login prompt, so I was wondering what does.

share|improve this question
    
Could it possibly be in the rc.sysinit file? –  sqenixs Dec 7 '11 at 2:20
    
In Debian, its in /etc/inittab. Might be the same on RedHat. –  derobert Dec 7 '11 at 3:59
add comment

1 Answer

up vote 4 down vote accepted

By 'login shell' you mean the login prompt you get when you hook your server up to a keyboard and monitor? And the same login shells on the other virtual terminals accessed with CtrlAltF2 and so on?

On RHEL 4 and 5, they are started in /etc/inittab, look for the lines that say mingetty. The inittab man page will explain what the lines mean but it goes in the format like id:runlevels:action:process. You can comment them out or add new ones and run telinit q to have it re-read it your inittab.

On RHEL 6, they are started in /etc/init/tty.conf with the ttys defined in /etc/sysconfig/init. If you look at /etc/inittab it actually gives an short explanation but Red Hat has an explanation on their website too. RHEL 6 switched to upstart for RHEL 6 which is why it is different (don't be confused by the fact upstart is on the Ubuntu website, it was started by Ubuntu but other distros use it too).

Edit: init is the first process started by our OS, it is what spawns all of your services. It has a PID of 1. When it starts it reads /etc/inittab and if you look at the lines that say reference rc with some number, that is what is starting your services at your desired run level. It likewise makes sure mingetty is running at your desired levels on your desired devices. You can read more on the the init section of wikipedia's article on how linux boots and this article on from power to bash.

share|improve this answer
    
At what point is this process started? Does it start after the services in your run level directory or before? –  sqenixs Dec 7 '11 at 15:34
    
@sqenixs After. The scripts in the “run level directory” are executed when the runlevel changes. After the new runlevel is established, init starts the runlevel's permanent fixtures. –  Gilles Dec 7 '11 at 22:44
add comment

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.