²é¿´linux°æ±¾ÃüÁî
1. ²é¿´Äں˰汾ÃüÁ
1) [root@q1test01 ~]# cat /proc/version
Linux version 2.6.9-22.ELsmp (bhcompile@crowe.devel.redhat.com) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Mon Sep 19 18:00:54 EDT 2005
2) [root@q1test01 ~]# uname -a
Linux q1test01 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
3) [root@q1test01 ~]# uname -r
2.6.9-22.ELsmp
2. ²é¿´linux°æ±¾£º
1) µÇ¼µ½·þÎñÆ÷Ö´ÐÐ lsb_release -a ,¼´¿ÉÁгöËùÓа汾ÐÅÏ¢,ÀýÈç:
[root@3.5.5Biz-46 ~]# [root@q1test01 ~]# lsb_release -a
LSB Version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-
ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
Release: 4
Codename: NahantUpdate2
×¢:Õâ¸öÃüÁîÊÊÓÃÓÚËùÓеÄlinux£¬°üÀ¨Redhat¡¢SuSE¡¢DebianµÈ·¢Ðа档
2) µÇ¼µ½linuxÖ´ÐÐcat /etc/issue,ÀýÈçÈçÏÂ:
[root@q1test01 ~]# cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
Kernel \r on an \m
3) µÇ¼µ½linuxÖ´ÐÐcat /etc/redhat-release ,ÀýÈçÈçÏÂ:
[root@q1test01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
×¢:ÕâÖÖ·½Ê½Ï¿ÉÒÔÖ±½Ó¿´µ½¾ßÌåµÄ°æ±¾ºÅ£¬±ÈÈç AS4 Update 1
4)µÇ¼µ½linuxÖ´ÐÐrpm -q redhat-release ,ÀýÈçÈçÏÂ:
[root@q1test01 ~]# rpm -q redhat-release
redhat-release-4AS-3
×¢:ÕâÖÖ·½Ê½Ï¿ɿ´µ½Ò»¸öËùνµÄreleaseºÅ£¬±ÈÈçÉϱߵÄÀý×ÓÊÇ3
Õâ¸öreleaseºÅºÍʵ¼ÊµÄ°æ±¾Ö®¼ä´æÔÚÒ»¶¨µÄ¶ÔÓ¦¹ØÏµ£¬ÈçÏ£º
redhat-release-3AS-1 -> Redhat Enterprise Linux AS 3
redhat-release-3AS-7.4 -> Redhat Enterprise Linux AS 3 Update 4
redhat-release-4AS-2 -> Redhat Enterprise Linux AS 4
redhat-release-4AS-2.4 -> Redhat Enterprise Linux AS 4 Update 1
redhat-release-4AS-3 -> Redhat Enterprise Linux AS 4 Update 2
redhat-release-4AS-4.1 -> Redhat Enterprise Linux AS 4 Update 3
redhat-release-4AS-5.5 -> Redhat Enterprise Linux AS 4 Update 4
Áí:µÚ3)¡¢4)Á½ÖÖ·½·¨Ö»¶ÔRedhat LinuxÓÐЧ¡£
Ïà¹ØÎĵµ£º
1. ²½ÖèÒ»
·¨Ò»£ºÐÞ¸Äϵͳ±àÒëʱҪÓõ½µÄConfig.in£¬Ôö¼ÓÄãÒªÓõÄÈ«¾Ö±äÁ¿
·¨¶þ£ºÐ´Ò»¸ö×Ô¼ºµÄConfig.in,È»ºóÔÚÆäËû»á±àÒëµ½µÄConfig.inÖаüº¬
2.²½Öè¶þ
make menuconfig
Ö®ºóÔÚÉú³ÉµÄ.configÖУ¬¾Í¿ÉÒÔgrepµ½ÐÂÌí¼ÓµÄ±äÁ¿ÁË
3.²½ÖèÈý
ÔÚMakefileÖоͿÉÒÔÓÃÕâ¸ö±äÁ¿ÁË¡£ ......
Purpose
This examples shows how to create and stop a kernel thread.
The driver is implemented as a loadable module. In the init_module() routine five kernel threads are created. This kernel threads sleep one second, wake up, print a message and fall asleep again. On unload of the module (cle ......
debian lenny , my favorite
a. vim /etc/sysctl.conf:
modify net.ipv4.ip_forward = 1
b. flush route table:
iptables -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
c. open NAT services:
&nb ......
LinuxÐźÅÓжàÖÖ˵·¨¡£Ò»¸ö½ø³Ì´´½¨Ò»¸öÐźÅÓÃÓÚ·¢Ë͸øÁíÍâÒ»¸ö½ø³Ì½Ð×ö·¢ËÍÒ»¸öÐźţ¬Äں˴´½¨Ò»¸öÐźŽÐ×öÉú³ÉÒ»¸öÐźţ¬½ø³Ì×Ô¼ºÏò×Ô¼º·¢ËÍÐźŽÐ×ö»½ÆðÒ»¸öÐźš£²»¹ýÎÒ¿´Ò²Ã»±ØÒªÕâôѧ¾¿Æø¡£
Ðźż¯--signel set,Æäʵ¾ÍÊǽ«¶à¸öÐźŷÅÔÚ¼¯ºÏÖнøÐм¯ÖеĴ¦Àí¡£POSIX.1¶¨ÒåÁËsigset_tÒÔ°üºÒ»¸öÐźż¯£ ......