when I type the uname -r command on linux:
uname -r
I get the following info:
2.6.18-274.7.1.el5PAE
my question from which file uname -r read this info , or from where uname -r read the Data ?
when I type the uname -r command on linux:
uname -r
I get the following info:
2.6.18-274.7.1.el5PAE
my question from which file uname -r read this info , or from where uname -r read the Data ?
The files like following you can change:
[sgeorge@sgeorge-ld proc]$ ls -l /proc/sys/kernel/{hostname,domainname}
-rw-r--r-- 1 root root 0 Jan 10 00:07 /proc/sys/kernel/domainname
-rw-r--r-- 1 root root 0 Jan 10 00:07 /proc/sys/kernel/hostname
But files like following, you can't change values:
[sgeorge@SUKU proc]$ ls -l /proc/sys/kernel/{osrelease,ostype,version}
-r--r--r-- 1 root root 0 Jan 10 00:07 /proc/sys/kernel/osrelease
-r--r--r-- 1 root root 0 Jan 10 00:07 /proc/sys/kernel/ostype
-r--r--r-- 1 root root 0 Jan 10 00:07 /proc/sys/kernel/version
Demo:
[root@sgeorge-ld ~]# sudo echo "SUKU" > /proc/sys/kernel/hostname
[root@sgeorge-ld ~]# bash
[root@SUKU ~]# echo 121212 > /proc/sys/kernel/version
bash: /proc/sys/kernel/version: Permission denied
[root@SUKU ~]# echo 121212 > /proc/sys/kernel/ostype
bash: /proc/sys/kernel/ostype: Permission denied
[root@SUKU ~]# echo 121212 > /proc/sys/kernel/osrelease
bash: /proc/sys/kernel/osrelease: Permission denied
You can't modify these values.
These files can be tuned only when you build a new kernel.