Difference between revisions of "Kenv"
(Created page with "{{welcome}} {{Navbar Kernel Competence}} Category:Kernel") |
|||
Line 1: | Line 1: | ||
{{welcome}} | {{welcome}} | ||
{{Navbar Kernel Competence}} | {{Navbar Kernel Competence}} | ||
+ | |||
+ | ==Introduction== | ||
+ | |||
+ | With kenv you can dump or modify the kernel environment. | ||
+ | |||
+ | ==Usage== | ||
+ | |||
+ | If you you write | ||
+ | |||
+ | <code>>kenv</code> | ||
+ | |||
+ | in your terminal, you will get the complete ''kernel environment'' tree. | ||
+ | These variables are the loader variables and relate to initial hardware probes. The right decision has to be made before anything in the kernel accesses the specific hardware. | ||
+ | |||
+ | Kernel environment variables can be set in the ''/boot/loader.conf'' | ||
+ | |||
+ | There are following options: | ||
+ | * <code>>kenv -h</code> ''-h'' will limit the report to kernel probe hints. | ||
+ | * If an optional ''variable name'' is specified, kenv will only report that value. | ||
+ | * If the ''-N'' option is specified, kenv will only display variable names and not their values. | ||
+ | * If the ''-u'' option is specified, kenv will delete the given environment variable. If the environment variable is followed by an optional value, kenv will set the environment variable to this value. | ||
+ | * If the ''-q'' option is set, warnings normally printed as a result of being unable to perform the requested operation will be suppressed. | ||
+ | * If the ''-v'' option is set, the variable name will be printed out for the environment variable in addition to the value when kenv is executed with a variable name. | ||
+ | |||
+ | Variables can be added to the kernel environment using the /boot/loader.conf file, or also statically compiled into the kernel using the statement | ||
+ | |||
+ | <code>env ''filename''</code> | ||
+ | |||
+ | in the kernel config file. The file can contain lines of the form | ||
+ | <code> name = value </code> <nowiki># </nowiki>this is a comment | ||
+ | |||
+ | where whitespace around `name' and `=', and everything after a `<nowiki># </nowiki>' character, are ignored. Almost any printable character except `=' is accept able as part of a name. Quotes are optional and necessary only if the value contains whitespace. | ||
Revision as of 15:11, 27 February 2020
Welcome to Kenv. |
Kernel Competence | ||
---|---|---|
Sysctl | Kldstat | Third-party Kernel Modules |
Kernel Modules | FreeBSD Ports: Kld | Kenv |
Compiling a new GhostBSD kernel | ||
Back to the System |
Introduction
With kenv you can dump or modify the kernel environment.
Usage
If you you write
>kenv
in your terminal, you will get the complete kernel environment tree. These variables are the loader variables and relate to initial hardware probes. The right decision has to be made before anything in the kernel accesses the specific hardware.
Kernel environment variables can be set in the /boot/loader.conf
There are following options:
-
>kenv -h
-h will limit the report to kernel probe hints. - If an optional variable name is specified, kenv will only report that value.
- If the -N option is specified, kenv will only display variable names and not their values.
- If the -u option is specified, kenv will delete the given environment variable. If the environment variable is followed by an optional value, kenv will set the environment variable to this value.
- If the -q option is set, warnings normally printed as a result of being unable to perform the requested operation will be suppressed.
- If the -v option is set, the variable name will be printed out for the environment variable in addition to the value when kenv is executed with a variable name.
Variables can be added to the kernel environment using the /boot/loader.conf file, or also statically compiled into the kernel using the statement
env filename
in the kernel config file. The file can contain lines of the form
name = value
# this is a comment
where whitespace around `name' and `=', and everything after a `# ' character, are ignored. Almost any printable character except `=' is accept able as part of a name. Quotes are optional and necessary only if the value contains whitespace.