Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÄÚºËÇý¶¯

ÄÚºËÇý¶¯·ÖÀà
Çý¶¯ÊµÏÖ¹¦ÄÜ£º
¶Á
д
´ò¿ª
ÉèÖÃ
×îÖÕÄ¿µÄ²Ù×÷Ó²¼þÉ豸£ºÊý¾Ý´«ÊäºÍÊý¾Ý¿ØÖÆ
Ó²¼þ²Î¿¼ÊֲᣬÄÚºËÌṩµÄ¹¦ÄÜ£º²Ù×÷ʱÐò£¬×ÜÏßÈçºÎ²Ù×÷£¬ÄÚºËAPI
 
 
 
1.×Ö·ûÉ豸£¨char£©
2.¿éÉ豸£¨block£©
3.ÍøÂçÉ豸£¨net£©
 
 
ÄÚºËÄ£¿é²Ù×÷ÃüÁî
make
¼ÓÔØ:sudo modprobe ./ModuleHellowWorld
sudo insmod ./ModuleHellowWorld.ko
²é¿´ÄÚºËÄ£¿é£ºlsmod
dmseg
жÔØÄÚºËÄ£¿é£ºrmmod
 
 
×Ö·ûÉ豸Çý¶¯¿ª·¢
 
 
 


Ïà¹ØÎĵµ£º

Linux²Ù×÷ϵͳÏÂÈçºÎÌí¼Ó·þÎñ

#!/bin/sh ÊÇ˵Ã÷¸Ã½Å±¾µ÷ÓõÄshellµÄÀàÐÍ
 
#chkconfig: 2345 80 05 ÆäÖÐ2345ÊÇÖ¸Ã÷·þÎñµÄÔËÐеȼ¶£¬80±íÃ÷ÊÇϵͳÆô¶¯Ê±ÒªÆô¶¯µÚ80ºÅ·þÎñ£¨·þÎñºÅ¿ÉÒÔÖظ´£©¡£05±íÃ÷ÊÇϵͳ¹Ø±ÕҪֹͣµÄ·þÎñºÅ¡£
 
#descrīption: service ÕâÀïµÄserviceÄã¿ÉÒÔËæ±ãÌí£¬µ«±ØÐëÓÐ
 
case $1 in ÕâÀïµÄcaseÊǸöÑ¡ÔñÓ ......

VMwareÉÏCentOS LinuxÍøÂçÅäÖÃ

½«ÁªÍø·½Ê½ÉèÖÃΪNAT
µÚÒ»²½£º
      cdµ½/etc/sysconfig/network-scriptsϵµÄifcfg-eth0
µÚ¶þ²½£º
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
#BOOTPROTO=static
BOOTPROTO=none
BROADCAST=192.168.174.255
HWADDR=00:0C:29:F2:BB:A9
IPADDR=192.168.174.11 ......

linuxµÄÎļþºÍĿ¼

chmod £»ÐÞ¸ÄĿ¼ȨÏÞ
eg£ºchmod o-t /tmp
touch:´´½¨ÐÂÎļþ
rm -rf:ɾ³ýÎļþ
set gid ¶ÔĿ¼µÄ×÷ÓÃ
1£ºÄ¬ÈÏÇé¿öÏ£¬Óû§½¨Á¢µÄÎļþÊôÓÚÓû§µ±Ç°ËùÔÚµÄ×é
2£ºÄ¿Â¼ÉÏÉèÖÃÁËsetgid£¬±íʾÔÚ´ËĿ¼ÖУ¬ÈκÎÈ˽¨Á¢µÄÎļþ£¬¶¼»áÊôÓÚĿ¼ËùÊôµÄ×é¡£
rm -rf test  //ɾ³ý֮ǰµÄtestĿ¼
mkdir test // ÔÚµ±Ç°Ä¿Â¼´´½¨Ò ......

linux signalº¯Êý

CÓïÑÔÖеijéÏóº¯Êý¶¨ÒåÒ²¾ÍÊÇʹÓÃÁ˺¯ÊýÖ¸Õ룬ÕâÀïÓÃsignalº¯Êý½âÊÍһϳéÏóº¯Êý¶¨ÒåµÄº¬ÒåºÍ¹æÔò¡£
signalº¯Êý¶¨ÒåΪ£º
void (   * signal (int signum , void (*handler)(int)  )   )(int);
 
¿ÉÒÔÕâÑù¶¨Òå
typedef  void(* handler) (int)
handler signal(int signum,handler) ......

linux²¶»ñKILLÃüÁîµÄÐźÅ

linuxÖÐÒ»¹²ÓÐ32ÖÖÐźţ¬ÔÚ/usr/include/bits/signum.h Í·ÎļþÖпÉÒÔ¿´µ½
#define    SIGHUP        1    /* Hangup (POSIX).  */
#define    SIGINT        2    /* Interrupt (ANSI).& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ