易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux GRUB 方式切换启动级别(runlevel)

    事因修改了某个配置文件,导致系统启动某个服务的时候hold住了,系统启动不起来。这种情况下常常通过修改表启动级别,切换到非xwindow模式下重新启动,一般选取启动级别runlevel为3即可。
参考环境:Redhat Enterprise Linux AS 4
步骤:
1.当Linux启动时,按 e  进去参数选择编辑界面:
2.移动光标选中系统(Red Hat Enterprise Linux AS (2.6.9-55.ELsmp)),按 e:
3.移动光标选中(kernel /vmlinuxz-2.6.9-55.ELsmp ro root=LABEL=/ rhgb quiet):
4.修改rhgb为3,然后按enter键:
5.选中(kernel /vmlinuxz-2.6.9-55.ELsmp ro root=LABEL=/ 3 quiet),按 b, 系统则进去启动程序。
注,当系统reboot时,会自动切换到xwindows启动方式的runlevel(5);
另,如果能进去系统, 或者能启动sshd服务,则通过修改/etc/inittab 文件更改runlevel。
遗憾的是暂时无法上传图片,各个步骤的截图只能搁下了~~
参考:
Runlevel  System State
0  Halt the system
1   Single user mode
2  Basic multi user mode
3  Multi user mode
5  Multi user mode with GUI
6  Reboot the system
S, s  Single user mode


相关文档:

Linux时钟基本概念

1、系统时钟(System Clock)与实时时钟(Real Time Clock)
实时时钟指的是硬件时钟,而系统时钟指的是软件时钟,存在于Linux系统之中。当系统启动时,Linux会从硬件读取时间做为系统时间,之后便一直采用系统时间。Linux命令date可以用来设置系统时钟,而hwclock或者clock则用来设置实时时钟,即硬件时钟。
2、时钟频率
单 ......

linux daemon() 用法

名称
      daemon-运行于后台
概要
      #include <unistd.h>
      int daemon(int nochdir, int noclose);
描述
      daemon()函数,主要用于某些程序希望自己脱离终端的控制而运行 ......

在linux下安装Sqlite

安装Sqlite
首先是下载sqlite-3.3.8.tar.gz。
1、解压sqlite-3.3.8.tar.gz:tar –xzvf sqlite-3.3.8.tar.gz,得到sqlite-3.3.8的文件。
2、在sqlite-3.3.8同一目录下创建sqlite文件:mkdir sqlite
3、Cd sqlite
4、执行configure生成安装程序
5、   ../sqlite-3.3.8/configure --prefix=/home/work/zd ......

linux epoll用于socket控制 代码实例

关于epoll使用方法:
参照:  http://linux.die.net/man/4/epoll
实例代码:(来自网上某论坛)
#include <pthread.h>
#include <stdio.h>
#include <sys/timeb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/epoll.h> ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号