Where are the current kernel build options stored?
up vote
19
down vote
favorite
Is there a way to know if the kernel was compiled with a certain option activated (i.e. CONFIG_PROC_EVENTS=y
) without having to pull out the kernel sources package and looking in the config file?
linux-kernel compiling
add a comment |
up vote
19
down vote
favorite
Is there a way to know if the kernel was compiled with a certain option activated (i.e. CONFIG_PROC_EVENTS=y
) without having to pull out the kernel sources package and looking in the config file?
linux-kernel compiling
add a comment |
up vote
19
down vote
favorite
up vote
19
down vote
favorite
Is there a way to know if the kernel was compiled with a certain option activated (i.e. CONFIG_PROC_EVENTS=y
) without having to pull out the kernel sources package and looking in the config file?
linux-kernel compiling
Is there a way to know if the kernel was compiled with a certain option activated (i.e. CONFIG_PROC_EVENTS=y
) without having to pull out the kernel sources package and looking in the config file?
linux-kernel compiling
linux-kernel compiling
edited Nov 21 at 2:42
Evan Carroll
4,96094176
4,96094176
asked Jul 17 '13 at 3:25
Alicia
7221718
7221718
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
up vote
13
down vote
If you look through your /boot
directory you'll notice these files:
$ ls -l /boot/|grep config
-rw-r--r-- 1 root root 109919 Oct 21 2011 config-2.6.35.14-100.fc14.x86_64
-rw-r--r-- 1 root root 109919 Oct 27 2011 config-2.6.35.14-103.fc14.x86_64
-rw-r--r-- 1 root root 109919 Nov 23 2011 config-2.6.35.14-106.fc14.x86_64
Notice what version of the Kernel you're using:
$ uname -r
2.6.35.14-106.fc14.x86_64
If you grep
through the appropriate "config-uname -r
" file you can see what options the Kernel was built with:
$ grep CONFIG_PROC_EVENTS= /boot/config-`uname -r`
CONFIG_PROC_EVENTS=y
References
- How To Check What Kernel Build Options Enabled In The Linux Kernel?
3
That's true in Debian based distros, but may not be true in others, i.e. Arch Linux.
– Alicia
Jul 17 '13 at 6:56
1
@ntrrgc - I can't confirm for ArchLinux, but it's that way for RedHat, Debian, & Ubuntu. These 3 distros cover most of the *nix world. If someone has a ArchLinux distro can you please confirm this approach?
– slm♦
Jul 17 '13 at 11:24
2
I use Arch Linux and I can confirm this does not work in Arch Linux.
– Alicia
Jul 17 '13 at 15:31
@slm this isn't even true for Ubuntu, at least Kubuntu. I just checked — the only thing I have in/boot/
isgrub
directory.
– Hi-Angel
Nov 24 '15 at 15:52
@slm perhaps are these configs a part of some package? Then it would be enough to list files of that package.
– Hi-Angel
Nov 24 '15 at 16:02
|
show 4 more comments
up vote
11
down vote
Kernel options can be found in /proc/config.gz
.
zgrep CONFIG_PROC_EVENTS= /proc/config.gz
if the kernel was compiled with CONFIG_IKCONFIG_PROC=y
.
6
This only works if kernel is compiled with CONFIG_IKCONFIG_PROC set.
– Bruce Ediger
Jul 17 '13 at 3:46
1
This did not work for me on any of the distros that I had available: Debian, RedHat based, nor Ubuntu. These are all stock systems so I don't think this approach is that useful unless you built your kernel yourself or your particular distro provides it.
– slm♦
Jul 17 '13 at 11:25
1
In distro kernels, the IKCONFIG option may be enabled only as a module. Try tomodprobe configs
and check if /proc/config.gz shows up.
– XZS
Sep 5 '13 at 15:21
add a comment |
up vote
0
down vote
If your kernel was build with CONFIG_IKCONFIG_PROC
, you can find the configuration listed in /proc/config.gz
zless /proc/config.gz
Debian and Redhat based kernel packages generally install a config-$version
file in /boot
,
less /boot/config-$(uname -r)
In Debian you can also find the default options in kernel-package
's ./kernel/Config/config
as well as architecture specific configuration options in ./kernel/Config/
.
mkdir /tmp/k
cd /tmp/k
apt-get source kernel-package
find . -path '*/kernel/Config/*' -type f
add a comment |
up vote
-1
down vote
sudo find / -xdev -name .config
(-xdev keeps it on one filesystem)
Generally it will be under /usr/src/some-specific-kernel-header-version/.config
Just read it as any text, search with grep, or to see how two versions differ diff -y -suppress-common-lines /path/linux2.6-r3/.config /path/linux2.6-r4/.config
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
13
down vote
If you look through your /boot
directory you'll notice these files:
$ ls -l /boot/|grep config
-rw-r--r-- 1 root root 109919 Oct 21 2011 config-2.6.35.14-100.fc14.x86_64
-rw-r--r-- 1 root root 109919 Oct 27 2011 config-2.6.35.14-103.fc14.x86_64
-rw-r--r-- 1 root root 109919 Nov 23 2011 config-2.6.35.14-106.fc14.x86_64
Notice what version of the Kernel you're using:
$ uname -r
2.6.35.14-106.fc14.x86_64
If you grep
through the appropriate "config-uname -r
" file you can see what options the Kernel was built with:
$ grep CONFIG_PROC_EVENTS= /boot/config-`uname -r`
CONFIG_PROC_EVENTS=y
References
- How To Check What Kernel Build Options Enabled In The Linux Kernel?
3
That's true in Debian based distros, but may not be true in others, i.e. Arch Linux.
– Alicia
Jul 17 '13 at 6:56
1
@ntrrgc - I can't confirm for ArchLinux, but it's that way for RedHat, Debian, & Ubuntu. These 3 distros cover most of the *nix world. If someone has a ArchLinux distro can you please confirm this approach?
– slm♦
Jul 17 '13 at 11:24
2
I use Arch Linux and I can confirm this does not work in Arch Linux.
– Alicia
Jul 17 '13 at 15:31
@slm this isn't even true for Ubuntu, at least Kubuntu. I just checked — the only thing I have in/boot/
isgrub
directory.
– Hi-Angel
Nov 24 '15 at 15:52
@slm perhaps are these configs a part of some package? Then it would be enough to list files of that package.
– Hi-Angel
Nov 24 '15 at 16:02
|
show 4 more comments
up vote
13
down vote
If you look through your /boot
directory you'll notice these files:
$ ls -l /boot/|grep config
-rw-r--r-- 1 root root 109919 Oct 21 2011 config-2.6.35.14-100.fc14.x86_64
-rw-r--r-- 1 root root 109919 Oct 27 2011 config-2.6.35.14-103.fc14.x86_64
-rw-r--r-- 1 root root 109919 Nov 23 2011 config-2.6.35.14-106.fc14.x86_64
Notice what version of the Kernel you're using:
$ uname -r
2.6.35.14-106.fc14.x86_64
If you grep
through the appropriate "config-uname -r
" file you can see what options the Kernel was built with:
$ grep CONFIG_PROC_EVENTS= /boot/config-`uname -r`
CONFIG_PROC_EVENTS=y
References
- How To Check What Kernel Build Options Enabled In The Linux Kernel?
3
That's true in Debian based distros, but may not be true in others, i.e. Arch Linux.
– Alicia
Jul 17 '13 at 6:56
1
@ntrrgc - I can't confirm for ArchLinux, but it's that way for RedHat, Debian, & Ubuntu. These 3 distros cover most of the *nix world. If someone has a ArchLinux distro can you please confirm this approach?
– slm♦
Jul 17 '13 at 11:24
2
I use Arch Linux and I can confirm this does not work in Arch Linux.
– Alicia
Jul 17 '13 at 15:31
@slm this isn't even true for Ubuntu, at least Kubuntu. I just checked — the only thing I have in/boot/
isgrub
directory.
– Hi-Angel
Nov 24 '15 at 15:52
@slm perhaps are these configs a part of some package? Then it would be enough to list files of that package.
– Hi-Angel
Nov 24 '15 at 16:02
|
show 4 more comments
up vote
13
down vote
up vote
13
down vote
If you look through your /boot
directory you'll notice these files:
$ ls -l /boot/|grep config
-rw-r--r-- 1 root root 109919 Oct 21 2011 config-2.6.35.14-100.fc14.x86_64
-rw-r--r-- 1 root root 109919 Oct 27 2011 config-2.6.35.14-103.fc14.x86_64
-rw-r--r-- 1 root root 109919 Nov 23 2011 config-2.6.35.14-106.fc14.x86_64
Notice what version of the Kernel you're using:
$ uname -r
2.6.35.14-106.fc14.x86_64
If you grep
through the appropriate "config-uname -r
" file you can see what options the Kernel was built with:
$ grep CONFIG_PROC_EVENTS= /boot/config-`uname -r`
CONFIG_PROC_EVENTS=y
References
- How To Check What Kernel Build Options Enabled In The Linux Kernel?
If you look through your /boot
directory you'll notice these files:
$ ls -l /boot/|grep config
-rw-r--r-- 1 root root 109919 Oct 21 2011 config-2.6.35.14-100.fc14.x86_64
-rw-r--r-- 1 root root 109919 Oct 27 2011 config-2.6.35.14-103.fc14.x86_64
-rw-r--r-- 1 root root 109919 Nov 23 2011 config-2.6.35.14-106.fc14.x86_64
Notice what version of the Kernel you're using:
$ uname -r
2.6.35.14-106.fc14.x86_64
If you grep
through the appropriate "config-uname -r
" file you can see what options the Kernel was built with:
$ grep CONFIG_PROC_EVENTS= /boot/config-`uname -r`
CONFIG_PROC_EVENTS=y
References
- How To Check What Kernel Build Options Enabled In The Linux Kernel?
answered Jul 17 '13 at 4:47
slm♦
244k66505670
244k66505670
3
That's true in Debian based distros, but may not be true in others, i.e. Arch Linux.
– Alicia
Jul 17 '13 at 6:56
1
@ntrrgc - I can't confirm for ArchLinux, but it's that way for RedHat, Debian, & Ubuntu. These 3 distros cover most of the *nix world. If someone has a ArchLinux distro can you please confirm this approach?
– slm♦
Jul 17 '13 at 11:24
2
I use Arch Linux and I can confirm this does not work in Arch Linux.
– Alicia
Jul 17 '13 at 15:31
@slm this isn't even true for Ubuntu, at least Kubuntu. I just checked — the only thing I have in/boot/
isgrub
directory.
– Hi-Angel
Nov 24 '15 at 15:52
@slm perhaps are these configs a part of some package? Then it would be enough to list files of that package.
– Hi-Angel
Nov 24 '15 at 16:02
|
show 4 more comments
3
That's true in Debian based distros, but may not be true in others, i.e. Arch Linux.
– Alicia
Jul 17 '13 at 6:56
1
@ntrrgc - I can't confirm for ArchLinux, but it's that way for RedHat, Debian, & Ubuntu. These 3 distros cover most of the *nix world. If someone has a ArchLinux distro can you please confirm this approach?
– slm♦
Jul 17 '13 at 11:24
2
I use Arch Linux and I can confirm this does not work in Arch Linux.
– Alicia
Jul 17 '13 at 15:31
@slm this isn't even true for Ubuntu, at least Kubuntu. I just checked — the only thing I have in/boot/
isgrub
directory.
– Hi-Angel
Nov 24 '15 at 15:52
@slm perhaps are these configs a part of some package? Then it would be enough to list files of that package.
– Hi-Angel
Nov 24 '15 at 16:02
3
3
That's true in Debian based distros, but may not be true in others, i.e. Arch Linux.
– Alicia
Jul 17 '13 at 6:56
That's true in Debian based distros, but may not be true in others, i.e. Arch Linux.
– Alicia
Jul 17 '13 at 6:56
1
1
@ntrrgc - I can't confirm for ArchLinux, but it's that way for RedHat, Debian, & Ubuntu. These 3 distros cover most of the *nix world. If someone has a ArchLinux distro can you please confirm this approach?
– slm♦
Jul 17 '13 at 11:24
@ntrrgc - I can't confirm for ArchLinux, but it's that way for RedHat, Debian, & Ubuntu. These 3 distros cover most of the *nix world. If someone has a ArchLinux distro can you please confirm this approach?
– slm♦
Jul 17 '13 at 11:24
2
2
I use Arch Linux and I can confirm this does not work in Arch Linux.
– Alicia
Jul 17 '13 at 15:31
I use Arch Linux and I can confirm this does not work in Arch Linux.
– Alicia
Jul 17 '13 at 15:31
@slm this isn't even true for Ubuntu, at least Kubuntu. I just checked — the only thing I have in
/boot/
is grub
directory.– Hi-Angel
Nov 24 '15 at 15:52
@slm this isn't even true for Ubuntu, at least Kubuntu. I just checked — the only thing I have in
/boot/
is grub
directory.– Hi-Angel
Nov 24 '15 at 15:52
@slm perhaps are these configs a part of some package? Then it would be enough to list files of that package.
– Hi-Angel
Nov 24 '15 at 16:02
@slm perhaps are these configs a part of some package? Then it would be enough to list files of that package.
– Hi-Angel
Nov 24 '15 at 16:02
|
show 4 more comments
up vote
11
down vote
Kernel options can be found in /proc/config.gz
.
zgrep CONFIG_PROC_EVENTS= /proc/config.gz
if the kernel was compiled with CONFIG_IKCONFIG_PROC=y
.
6
This only works if kernel is compiled with CONFIG_IKCONFIG_PROC set.
– Bruce Ediger
Jul 17 '13 at 3:46
1
This did not work for me on any of the distros that I had available: Debian, RedHat based, nor Ubuntu. These are all stock systems so I don't think this approach is that useful unless you built your kernel yourself or your particular distro provides it.
– slm♦
Jul 17 '13 at 11:25
1
In distro kernels, the IKCONFIG option may be enabled only as a module. Try tomodprobe configs
and check if /proc/config.gz shows up.
– XZS
Sep 5 '13 at 15:21
add a comment |
up vote
11
down vote
Kernel options can be found in /proc/config.gz
.
zgrep CONFIG_PROC_EVENTS= /proc/config.gz
if the kernel was compiled with CONFIG_IKCONFIG_PROC=y
.
6
This only works if kernel is compiled with CONFIG_IKCONFIG_PROC set.
– Bruce Ediger
Jul 17 '13 at 3:46
1
This did not work for me on any of the distros that I had available: Debian, RedHat based, nor Ubuntu. These are all stock systems so I don't think this approach is that useful unless you built your kernel yourself or your particular distro provides it.
– slm♦
Jul 17 '13 at 11:25
1
In distro kernels, the IKCONFIG option may be enabled only as a module. Try tomodprobe configs
and check if /proc/config.gz shows up.
– XZS
Sep 5 '13 at 15:21
add a comment |
up vote
11
down vote
up vote
11
down vote
Kernel options can be found in /proc/config.gz
.
zgrep CONFIG_PROC_EVENTS= /proc/config.gz
if the kernel was compiled with CONFIG_IKCONFIG_PROC=y
.
Kernel options can be found in /proc/config.gz
.
zgrep CONFIG_PROC_EVENTS= /proc/config.gz
if the kernel was compiled with CONFIG_IKCONFIG_PROC=y
.
edited Apr 16 at 10:40
Ciro Santilli 新疆改造中心 六四事件 法轮功
4,70824038
4,70824038
answered Jul 17 '13 at 3:25
Alicia
7221718
7221718
6
This only works if kernel is compiled with CONFIG_IKCONFIG_PROC set.
– Bruce Ediger
Jul 17 '13 at 3:46
1
This did not work for me on any of the distros that I had available: Debian, RedHat based, nor Ubuntu. These are all stock systems so I don't think this approach is that useful unless you built your kernel yourself or your particular distro provides it.
– slm♦
Jul 17 '13 at 11:25
1
In distro kernels, the IKCONFIG option may be enabled only as a module. Try tomodprobe configs
and check if /proc/config.gz shows up.
– XZS
Sep 5 '13 at 15:21
add a comment |
6
This only works if kernel is compiled with CONFIG_IKCONFIG_PROC set.
– Bruce Ediger
Jul 17 '13 at 3:46
1
This did not work for me on any of the distros that I had available: Debian, RedHat based, nor Ubuntu. These are all stock systems so I don't think this approach is that useful unless you built your kernel yourself or your particular distro provides it.
– slm♦
Jul 17 '13 at 11:25
1
In distro kernels, the IKCONFIG option may be enabled only as a module. Try tomodprobe configs
and check if /proc/config.gz shows up.
– XZS
Sep 5 '13 at 15:21
6
6
This only works if kernel is compiled with CONFIG_IKCONFIG_PROC set.
– Bruce Ediger
Jul 17 '13 at 3:46
This only works if kernel is compiled with CONFIG_IKCONFIG_PROC set.
– Bruce Ediger
Jul 17 '13 at 3:46
1
1
This did not work for me on any of the distros that I had available: Debian, RedHat based, nor Ubuntu. These are all stock systems so I don't think this approach is that useful unless you built your kernel yourself or your particular distro provides it.
– slm♦
Jul 17 '13 at 11:25
This did not work for me on any of the distros that I had available: Debian, RedHat based, nor Ubuntu. These are all stock systems so I don't think this approach is that useful unless you built your kernel yourself or your particular distro provides it.
– slm♦
Jul 17 '13 at 11:25
1
1
In distro kernels, the IKCONFIG option may be enabled only as a module. Try to
modprobe configs
and check if /proc/config.gz shows up.– XZS
Sep 5 '13 at 15:21
In distro kernels, the IKCONFIG option may be enabled only as a module. Try to
modprobe configs
and check if /proc/config.gz shows up.– XZS
Sep 5 '13 at 15:21
add a comment |
up vote
0
down vote
If your kernel was build with CONFIG_IKCONFIG_PROC
, you can find the configuration listed in /proc/config.gz
zless /proc/config.gz
Debian and Redhat based kernel packages generally install a config-$version
file in /boot
,
less /boot/config-$(uname -r)
In Debian you can also find the default options in kernel-package
's ./kernel/Config/config
as well as architecture specific configuration options in ./kernel/Config/
.
mkdir /tmp/k
cd /tmp/k
apt-get source kernel-package
find . -path '*/kernel/Config/*' -type f
add a comment |
up vote
0
down vote
If your kernel was build with CONFIG_IKCONFIG_PROC
, you can find the configuration listed in /proc/config.gz
zless /proc/config.gz
Debian and Redhat based kernel packages generally install a config-$version
file in /boot
,
less /boot/config-$(uname -r)
In Debian you can also find the default options in kernel-package
's ./kernel/Config/config
as well as architecture specific configuration options in ./kernel/Config/
.
mkdir /tmp/k
cd /tmp/k
apt-get source kernel-package
find . -path '*/kernel/Config/*' -type f
add a comment |
up vote
0
down vote
up vote
0
down vote
If your kernel was build with CONFIG_IKCONFIG_PROC
, you can find the configuration listed in /proc/config.gz
zless /proc/config.gz
Debian and Redhat based kernel packages generally install a config-$version
file in /boot
,
less /boot/config-$(uname -r)
In Debian you can also find the default options in kernel-package
's ./kernel/Config/config
as well as architecture specific configuration options in ./kernel/Config/
.
mkdir /tmp/k
cd /tmp/k
apt-get source kernel-package
find . -path '*/kernel/Config/*' -type f
If your kernel was build with CONFIG_IKCONFIG_PROC
, you can find the configuration listed in /proc/config.gz
zless /proc/config.gz
Debian and Redhat based kernel packages generally install a config-$version
file in /boot
,
less /boot/config-$(uname -r)
In Debian you can also find the default options in kernel-package
's ./kernel/Config/config
as well as architecture specific configuration options in ./kernel/Config/
.
mkdir /tmp/k
cd /tmp/k
apt-get source kernel-package
find . -path '*/kernel/Config/*' -type f
edited Nov 21 at 2:41
answered Nov 21 at 2:30
Evan Carroll
4,96094176
4,96094176
add a comment |
add a comment |
up vote
-1
down vote
sudo find / -xdev -name .config
(-xdev keeps it on one filesystem)
Generally it will be under /usr/src/some-specific-kernel-header-version/.config
Just read it as any text, search with grep, or to see how two versions differ diff -y -suppress-common-lines /path/linux2.6-r3/.config /path/linux2.6-r4/.config
add a comment |
up vote
-1
down vote
sudo find / -xdev -name .config
(-xdev keeps it on one filesystem)
Generally it will be under /usr/src/some-specific-kernel-header-version/.config
Just read it as any text, search with grep, or to see how two versions differ diff -y -suppress-common-lines /path/linux2.6-r3/.config /path/linux2.6-r4/.config
add a comment |
up vote
-1
down vote
up vote
-1
down vote
sudo find / -xdev -name .config
(-xdev keeps it on one filesystem)
Generally it will be under /usr/src/some-specific-kernel-header-version/.config
Just read it as any text, search with grep, or to see how two versions differ diff -y -suppress-common-lines /path/linux2.6-r3/.config /path/linux2.6-r4/.config
sudo find / -xdev -name .config
(-xdev keeps it on one filesystem)
Generally it will be under /usr/src/some-specific-kernel-header-version/.config
Just read it as any text, search with grep, or to see how two versions differ diff -y -suppress-common-lines /path/linux2.6-r3/.config /path/linux2.6-r4/.config
answered Jun 19 at 13:29
Max Power
1523
1523
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f83319%2fwhere-are-the-current-kernel-build-options-stored%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown