RH133 3. KERNEL MANAGEMENT



        KERNEL SERVICES

1.lsmod |less                        -->list all currently loaded modules

2. lsmod |grep <module>
     modprobe <module>                      -->load a module
EX:. lsmod |grep usb_storage
     modprobe usb_storage

3. lsmod |grep usb_storage
    modprobe -r <module>                    -->Unload a module
EX: lsmod |grep usb_storage
    modprobe  -r usb_storage

3.modinfo     <module> -->info about a module

All modules are stored under /lib/module/<kernelversion>/
kernel
Inbuilt documents about kernel can by obtained by installing
a package yum install kernel-doc.


4.vim /etc/modprobe.conf     -->config file for aliasing  a module
SYNTAX:      alias <newname> <oldname>   -->write this inside file
EXAMPLE:     alias  pendrive usb_storage

modprobe    <aliasname>      -->load a module using alias name
modprobe -r <aliasname>      -->Unload a module using alias name

5.Booleans related to kernel configurations are stored here.
ls /proc/sys/net/ipv4

6.vim /etc/sysctl.conf    //To set kernel booleans
net.ipv4.ip_forward = 1  //1 enable, 0 disable, this boolean is
                              used for enabling ip forwarding
7.sysctl -p                    -->Make changes permanent

8.Dynamic creation of /dev directory

rm -rf /dev/*      -->if /dev contents are removed
start_udev        -->command dynamicaly creates contents of /dev

9. Seven types of files

1.(-) file             -->touch/cat file
2.(d) dir              --> mkdir  dir
3.(l) link             -->ln -s file1 file2
4.(c) characterspecial -->use mknod command
5.(b) Blockspecial     -->use mknod command
6.(s) Socket file      -->write program to create socket
7.(p)  Pipe file       --> and pipe file

10. To create blockspecial/characterspecial file
     mknod  <nameoffile> <typeoffile> <majornum> <minornum>
ex:  mknod  /dev/abc        b            8          15

11./proc dir and /dev dir does not occupy any space in harddisk
they just created in ram once system is booted.


If you found this post useful, I would really love it, if you can Like the Page, or share it with your Facebook/Google+/Twitter Friends... It will keep me motivated. Thank you!

No comments:

Post a Comment