|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ISBN: 3836214830 ISBN: 3836214830 ISBN: 3836214830 ISBN: 3836214830 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Wir empfehlen: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A free Basic UNIX-training with muLinuxNotes: This Text is roughly translated (German to English) by a translating program. Sorry, but I have not time for the translation. Maybe you can do this.
Unix knows different modes, in which it runs. These are called run level. The
run level are most comparable with the gear shift of an auto. One shifts the
courses up when starting successively. For holding one switches again down. With
each travel all courses are not needed.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Run level | Meaning |
| 0 | Stop |
| S | Single user mode |
| 1 | Multi user mode without network |
| 2 | Multi user mode with network (standard) |
| 3 | Multi user mode with network and X |
| 4 | Freely |
| 5 | Freely |
| 6 | Reboot |
With the run level stop is driven down the system. The single user mode serves for maintaining the system. As the name it already says, only one user (the superuser) in this mode me can operate the system. This is absolutely necessary with maintenance work, since other users with their processes can disturb these work. Run level 1 enables here several the work with the system to users. With 2 and 3 the network or the graphic Login is switched on.
| Run level | Meaning |
| 0 | Stop |
| 1 | limbo level |
| 2 | Freely |
| 3 | Freely |
| 4 | full setup |
| 5 | Server, Daemons, x-Window |
| 6 | Shutdown |
The run level 1 is called here limbo. Run level 4 operates that setup - program off. Only run level 5 enables to use us the full performance of muLinux.
/# less /etc/inittab id:4:initdefault: r:S:sysinit:/etc/rc.4 l:1:once:/etc/rc.1 f:4:wait:/etc/rc.4 x:5:wait:/etc/rc.5 ca::ctrlaltdel:/etc/rc.6 l0:0:wait:/etc/rc.0 l6:6:wait:/etc/rc.6 c1:45:respawn:/bin/agetty 38400 tty1 c2:45:respawn:/bin/agetty 38400 tty2 c3:45:respawn:/bin/agetty 38400 tty3 c4:45:respawn:/bin/agetty 38400 tty4 c5:45:respawn:/bin/agetty 38400 tty5 c6:45:respawn:/bin/agetty 38400 tty6 #----------------------- # servers & deamons #----------------------- # at command scheduler AT:5:respawn:/usr/bin/atd...
Each line, not with one # begins (comment) begins, is a data record with four entries from each other separated by colon.
ID:Runlevel:Action:Prozess
ID serves for identifier of the process. This designator is output with entries in log files and with error messages.
In the second entry those are determined run level, with which the appropriate line is to be executed. If the field is empty, the internal message is executed with each mode change.
In the third entry one determines, which internal message of init one executes. init is the first program, which a Unixsystem starts. Here some init internal messages:
initdefault determines the run level, up to which the system waves off. Here the run level is 4.
sysinit activate the instruction determined after the colon once immediately after the system start, before any user receives acces to the system.
once activate the instruction determined after the colon. For the termination one does not wait.
wait activate the instruction determined after the colon. It is waited for the termination of the instruction.
ctrlaltdel activate the instruction determined after the colon with the "ape grasp" [Ctrl] [Alt] [del]. Here with it the run level 6 (shutdown) is released.
respawn activate the instruction determined after the colon with the transition in one of the aforementioned modes. This instruction is again again started, if it were terminated. Thus this process is alive held. Here there is the virtual consoles, which are made available after the Ausloggen again to logging in.
Several Skripte are called here (rc.0, rc.1, rc.4, rc.5 and rc.6). These contain the instruction, which are executed with the change to the run level. It is worthwhile itself to look at this Skripte times. For example rc.0 :
/# less /etc/rc.0
One sees the messages when driving the system down and among other things the instruction kill, unmountand stop.
With the "correct" Unix/Linux are available for the change of run level in place of a script in each case a directory. These directories contain scripts for the raising and deactivating the appropriate programs of the run level. Since muLinux from space reasons does not have these possibilities, the run level changes are not always " clean. "
The modification of initdefault usually those is adjustment which can be modified only in this file. With SuSE Linux can be changed here between text and graphical login (2 or 3).
Into the single user mode the following instruction changes:
/# init s
We can log in now only at a console. A raising to the run level 5 causes init 5.
/# init 5
Unfortunately this change does not fold with muLinux problem-free. A restart brings in order.
/# init 6Robert.Warnke@giso.de (copyleft) Robert Warnke, Berlin (Germany) - You can write me in English. | http://rowa.giso.de
|
Linux: Das umfassende Handbuch (Gebundene Ausgabe) von Johannes Plötner, Steffen Wendzel | |
| Siehe auch: | |
![]() | |
| Linux 2010: Debian, Fedora, openSUSE, Ubuntu.... | |
| Linux-Unix-Programmierung: Das umfassende Handbuch | |
| Shell-Programmierung: Das umfassende Handbuch | |
| Windows 7 für Administratoren: Das umfas... | |
| PC-Netzwerke: LAN und WLAN einrichten. Mit VoI... | |
| Einstieg in Linux: Eine distributionsunabhän... | |