Uname: Displays information about the Kernel.
Syn: Uname [option]
------> Let’s check &see which version of the kernel is currently running:
#uname -a
Linux root 2.6.32.71.e16.x86_64…
Note: The kernel version numbering is important here.
#rpm -qa /grep kernel
#rpm - q kernel
/boot : the place where the kernel and boot files are kept
/proc : Current hardware configuration & status.
/usr/src : Source code of the kernel.
/lib/modules : Kernel modules.
Lsmod: Lists currently loaded kernel modules
Syn: Lsmod
#lsmod
Module | Site | Used by |
Autofs4 | 29253 | 3 |
Hidp | 23105 | 2 |
Rfcomm | 42457 | 0 |
L2cap | 29505 | 1ʘ hidp, rfcomm |
Ext4 | 353979 | 2 |
[output truncated]
Modinfo: Displays information about a kernel module
#modinfo ext4
#modinfo cdrom
To find all the kernel Modules:
# cd /etc/lid/modules # ls
#find / -name *.ko (Modules in the system will bending with .ok extension)
Mod probe: à To remove the loaded module Syn: modprobe <modname> #modprobe –r vfat
#lsmod /grep -i vfat
#modprobe vfat
# lsmod / grep - i vfat
# uname - r
# yum inof kernel (or) #rpm - qi / grep kernel /
# yum update kernel - y (or) # rpm – ivh kernel -2.6.18-194.3.lel5
* Note: when updating a kernel with the rpm command, never use the -U option to update. The reason behind this is that the update option erases the prior kernel when updating, whereas the –i option installs the newer kernel alongside the old kernel. If something doesn’t work or goes wrong, you have an older kernel to revert to.
Inclined to build a profession as Linux Developer? Then here is the blog post on, explore Linux Training
Step 1): View the current value in the kernel:
#cat / proc/sys/net/ipv4/ip-forward
Step 2): Change the kernel option that controls packet forwarding:
#echo 1 > /proc/sys/net/ipv4/ip-forward
Step 3): Verify the value has changed:
#cat / proc/sys/net/ipv4/ip –forward
If you want the changes to be persistent across system reboots, you can put the parameters you’d like to remain during boot in the letc/sysctl. conf file.
Sysctl: Enables you to tune kernel
Before you start tuning things, let’s look at all the available options:
#sysctl -a
Now, let’s make the same changes to the kernel as before.
Step 1): query the parameter responsible for forwarding packets within the kernel
#sysctl - / grep ip_forward
Step 2): Using sysctl to change the option:
#sysctl -w net.ipv4.ip-forward = 1
Enables you to change a setting in the sysctl config file.
Step 3): verify the value has been changed:
# Sysctl - a / grep ip – forward
Step 4): return the parameter to its original value:
#sysctl -w net.ipv4.ip-forward=ʘ
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.