In: Computer Science
1) Open a new terminal.
a) Use the runlevel command. What is the current run level of your
system?
b) Use the command ls /usr/lib/system/system . What does this
show?
c) Use the command ls /etc/rc.d. What does this show?
d) Use the command ls/etc/rc.d/init.d. What SysV daemons are
available on your system?
e) Type init 3 and press Enter. The type runlevel. What is the most
recent runlevel?
f) Type init 1 and press enter. Does the runlevel command show the
recent level to change?
2) Describe what the /etc/inittab file does.
1.
A.) The run level command is used find the current and the previous run levels of the Unix operating system. It is a present operating state into which system is booted. The current runlevel of my system is 1 which refers to the single user mode.
B) the ls command is used to show the files or folders stored inside a directory or a folder. The result of the command - ls /usr/lib/system/system
C) all the system initaliazatiom scripts are there in this folder named etc/rc.d. The result of the command ls /etc/rc.d is
Since there were a huge number of files so I reduced to the required files only. Here the files named rc0.d rc1.d are the required scripts.
D) after running the command there were 5 daemons which are available on my system. They are - apparmor, kmod, procps, rsync.
E) the command init 3 refers to the multitasking network mode without gui. Which means it will change the current runlevel of 1 to runlevel 3. Which means multiple user mode under the command line interface without the gui.
F) init 1 refers to the single user mode and hence it will switch the current runlevel to runlevel 1 which is for single user mlde.so we can say that it will change the recent level.
2) The etc/inittab file is the configuration file which is used but the system V or we can also say as SysV initialization system in the Linux. This file contains 3 informations for the init -
a) Runlevel
B) what process to start stop and restart if terminated
C) what actions to take when enters a new runlevel
After the each entries in this file are executed and the boot process is completed then only your system will be available to log in.
Each line in the file is in the form of or can say that has four values as -
id:runlevels:action:process
Where id is the identification code, runlevel holds the value of current run level. Action values tells the init how to treat the process. And process defined the command or script to execute.