.\" Copyright (c) 1980, 1990 The Regents of the University of California. .\" All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)printenv.1 6.5 (Berkeley) %G% .\" .Vx .Vx .Dd .Dt PRINTENV 1 .UC .Sh NAME .Nm printenv , env .Nd print out the environment, set and print environment .Sh SYNOPSIS .Nm printenv .Op Ar name .Nm env .Op Fl .Op Ar name=value \&... .Op Ar command .Sh DESCRIPTION .Nm Printenv prints out the names and values of the variables in the environment, with one name/value pair per line. If .Ar name is specified, only its value is printed. .Pp If a .Ar name is specified and it is not defined in the environment, .Nm printenv returns exit status 1, else it returns status 0. .Pp .Nm Env executes .Ar command after modifying the environment as specified on the command line. The option .Ar name=value specifies an environmental variable, .Ar name , with a value of .Ar value . The option .Sq Fl causes .Nm env to completely ignore the environment it inherits. .Pp If no command is specified, .Nm env prints out the names and values of the variables in the environment, with one name/value pair per line. .Sh SEE ALSO .Xr csh 1 , .Xr sh 1 , .Xr execvp 3 , .Xr environ 7 .Sh HISTORY .Nm Printenv appeared in 3 BSD. .Sh BUGS .Nm Env doesn't handle commands with equal (``='') signs in their names, for obvious reasons.