/*
*File : test.c
*Author : DavidLin
*Date : 2014-12-07pm
*Email : [email protected] or [email protected]
*world : the city of SZ, in China
*Ver : 000.000.001
*history : editor time do
* 1)LinPeng 2014-12-07 created this file!
* 2)
*/
1.獲得root權限:su root;
2.make
3.insmod ./test.ko
4.rmmod test
5.tail -n 3 /var/log/messages
6.lsmod
執行完上述流程,就可以看到內核打印信息了,其中lsmod可以看到test模塊的靚影,歡迎來到內核的世界,Hello World。