Debian GNU Linux服务列表的获

/********************************************************************** Author : Samson* Date : 03/19/2015* Test platform:* gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2* GNU bash, 4.3.11(1)-release (x86_64-pc-linux-gnu) * *******************************************************************/

debian系统启动脚本

debian GNU/Linux使用SysV模块作为系统初始脚本。与RH一样,debian使用一个扩展的SysV模块,而slackware主要是基于BSD的,并为了使用SysV模块而写了几个方便的脚本。定位SysV目录debian GNU/Linux,与大多数使用SysV模块的系统一样,将相关的目录存放在/etc目录之下。也就是说,,SysV目录/etc/init.d是脚本自 身,而/etc/rc1.d,/etc/rc2.d直到/etc/rc6.d是特殊运行级别的目录。获取当前的服务列表:service –status-allroot@ufo:/etc/rcS.d# service –status-all [ + ] acpid[ ? ] alsa-utils[ – ] anacron[ + ] atd[ + ] avahi-daemon[ ? ] binfmt-support[ + ] bluetooth[ – ] bootlogs[ ? ] bootmisc.sh[ ? ] checkfs.sh[ ? ] checkroot-bootclean.sh[ – ] checkroot.sh[ – ] console-setup[ + ] cron[ + ] cups[ + ] dbus[ + ] exim4[ + ] gdm3[ ? ] hdparm[ – ] hostname.sh[ ? ] hwclock.sh[ – ] kbd[ – ] keyboard-setup[ ? ] killprocs[ ? ] kmod[ + ] minissdpd[ – ] motd[ ? ] mountall-bootclean.sh[ ? ] mountall.sh[ ? ] mountdevsubfs.sh[ ? ] mountkernfs.sh[ ? ] mountnfs-bootclean.sh[ ? ] mountnfs.sh[ ? ] mpt-statusd[ ? ] mtab.sh[ + ] network-manager[ ? ] networking[ + ] nfs-common[ ? ] pppd-dns[ – ] procps[ + ] pulseaudio[ ? ] rc.local[ – ] rmnologin[ + ] rpcbind[ + ] rsyslog[ + ] saned[ ? ] sendsigs[ ? ] speech-dispatcher[ – ] ssh[ – ] sudo[ + ] udev[ ? ] udev-mtab[ ? ] umountfs[ ? ] umountnfs.sh[ ? ] umountroot[ – ] unattended-upgrades[ – ] urandom[ – ] x11-common其中[ + ]表示的是现在正在运行的服务项,[ – ]表示当前服务没有运行。开启关闭服务项(以ssh服务为例):root@ufo:/etc/rcS.d# service ssh start[ ok ] Starting OpenBSD Secure Shell server: sshd.root@ufo:/etc/rcS.d# service ssh stop[ ok ] Stopping OpenBSD Secure Shell server: sshd.

也可以使用invoke-rc.d命令进行服务的执行等 。

使用服务项生效/失效:update-rc.d [-n] name disable|enable [ S|2|3|4|5 ]

只有不快的斧,没有劈不开的柴。

Debian GNU Linux服务列表的获

相关文章:

你感兴趣的文章:

标签云: