2005-01-10 08:39:26 +00:00
|
|
|
.\"-
|
2001-08-13 16:33:00 +00:00
|
|
|
.\" Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
|
2000-07-08 08:33:40 +00:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2012-05-12 02:49:40 +00:00
|
|
|
.Dd May 11, 2012
|
2000-07-08 08:33:40 +00:00
|
|
|
.Dt KENV 1
|
2001-07-10 14:16:33 +00:00
|
|
|
.Os
|
2000-07-08 08:33:40 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm kenv
|
2002-04-17 13:08:14 +00:00
|
|
|
.Nd dump or modify the kernel environment
|
2000-07-08 08:33:40 +00:00
|
|
|
.Sh SYNOPSIS
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2012-05-11 23:05:14 +00:00
|
|
|
.Op Fl hNq
|
2002-04-17 13:08:14 +00:00
|
|
|
.Nm
|
2012-05-11 23:05:14 +00:00
|
|
|
.Op Fl qv
|
2002-04-17 13:08:14 +00:00
|
|
|
.Ar variable Ns Op = Ns Ar value
|
|
|
|
.Nm
|
2005-09-13 19:01:53 +00:00
|
|
|
.Op Fl q
|
2002-04-17 13:08:14 +00:00
|
|
|
.Fl u
|
|
|
|
.Ar variable
|
2000-07-08 08:33:40 +00:00
|
|
|
.Sh DESCRIPTION
|
2001-09-21 07:04:47 +00:00
|
|
|
The
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2002-04-17 13:08:14 +00:00
|
|
|
utility will dump the kernel environment if
|
|
|
|
invoked without arguments.
|
2000-07-08 08:33:40 +00:00
|
|
|
If the
|
|
|
|
.Fl h
|
2001-09-21 07:04:47 +00:00
|
|
|
option is specified, it will limit the report to kernel probe hints.
|
|
|
|
If an optional
|
|
|
|
.Ar variable
|
|
|
|
name is specified,
|
2000-07-08 08:33:40 +00:00
|
|
|
.Nm
|
|
|
|
will only report that value.
|
2002-04-17 13:08:14 +00:00
|
|
|
If the
|
2012-05-11 23:05:14 +00:00
|
|
|
.Fl N
|
|
|
|
option is specified,
|
|
|
|
.Nm
|
|
|
|
will only display variable names and not their values.
|
|
|
|
If the
|
2002-04-17 13:08:14 +00:00
|
|
|
.Fl u
|
|
|
|
option is specified,
|
|
|
|
.Nm
|
|
|
|
will delete the given environment variable.
|
|
|
|
If the environment variable is followed by an optional
|
2002-05-29 18:52:02 +00:00
|
|
|
.Ar value ,
|
2002-04-17 13:08:14 +00:00
|
|
|
.Nm
|
|
|
|
will set the environment variable to this value.
|
2005-09-13 19:01:53 +00:00
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Fl q
|
|
|
|
option is set, warnings normally printed as a result of being unable to
|
|
|
|
perform the requested operation will be suppressed.
|
2009-01-13 12:19:43 +00:00
|
|
|
.Pp
|
2012-05-11 23:05:14 +00:00
|
|
|
If the
|
|
|
|
.Fl v
|
|
|
|
option is set, the variable name will be printed out for the
|
|
|
|
environment variable in addition to the value when
|
|
|
|
.Nm
|
|
|
|
is executed with a variable name.
|
|
|
|
.Pp
|
2009-01-13 12:19:43 +00:00
|
|
|
Variables can be added to the kernel environment using the
|
2011-02-21 16:03:39 +00:00
|
|
|
.Pa /boot/loader.conf
|
2009-01-13 12:19:43 +00:00
|
|
|
file, or also statically compiled into the kernel using the statement
|
|
|
|
.Pp
|
|
|
|
.Dl Ic env Ar filename
|
|
|
|
.Pp
|
|
|
|
in the kernel config file.
|
|
|
|
The file can contain lines of the form
|
|
|
|
.Pp
|
2009-01-13 18:25:56 +00:00
|
|
|
.Dl name = "value" # this is a comment
|
2009-01-13 12:19:43 +00:00
|
|
|
.Pp
|
2017-12-07 01:57:27 +00:00
|
|
|
where whitespace around
|
|
|
|
.Sq name
|
|
|
|
and
|
|
|
|
.Sq = ,
|
|
|
|
and everything after a
|
|
|
|
.Sq #
|
|
|
|
character, are ignored.
|
|
|
|
Almost any printable character except
|
|
|
|
.Sq =
|
|
|
|
is acceptable as part of a name.
|
|
|
|
Quotes are optional and necessary only if the value contains whitespace.
|
2000-07-08 08:33:40 +00:00
|
|
|
.Sh SEE ALSO
|
2002-04-18 18:49:41 +00:00
|
|
|
.Xr kenv 2 ,
|
2009-01-13 12:19:43 +00:00
|
|
|
.Xr config 5 ,
|
|
|
|
.Xr loader.conf 5 ,
|
2000-07-08 08:33:40 +00:00
|
|
|
.Xr loader 8
|
|
|
|
.Sh HISTORY
|
2001-09-21 07:04:47 +00:00
|
|
|
The
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2001-09-21 07:04:47 +00:00
|
|
|
utility appeared in
|
2000-11-23 11:21:35 +00:00
|
|
|
.Fx 4.1.1 .
|