LPDEST is an environment variable.
"env" is not a file or a place: it is one of the many ways to display all the environment variables that are currently set.
To see all the configured spooler destinations, run "lpstat -p". The output should look like this:
$ lpstat -p
printer foobar is idle. enabled since Jan 28 15:00
fence priority : 0
In the above example, there is only one spooler destination, "foobar".
If you want to configure more spooler destinations (= printers), use SAM/SMH, or commands "lpadmin" or "addqueue" (for network printers only).
To set environment variables like LPDEST, you first need to know which shell you're using. The command "echo $SHELL" might be helpful here.
If you're using tcsh or csh (yuck), you can set/overwrite environment variables with commands like:
setenv VARIABLE value
i.e.
setenv LPDEST foobar
If the variable already exists, the new value will overwrite the old one automatically.
To unset (remove) a variable with tcsh or csh:
unsetenv VARIABLE
With most other shells (i.e. the Bourne/POSIX-style shells) like sh, ksh, bash and zsh, the commands are slightly different.
In these shells, there are two common ways to set an environment variable:
VARIABLE=value
export VARIABLE
or
export VARIABLE=value
To unset(delete) an environment variable in Bourne/POSIX-style shells:
unset VARIABLE
The environment variables are specific to each process. A child process receives a copy of its parent's environment variables at the moment of its creation.
(That is, assuming the variable is *exported*: in csh/tcsh, all environment variables are exported by default. In Bourne/POSIX shells, if the "export" command is not used, the variable will not be copied to the environment of the child processes; it will be available for the shell itself only.)
Each process can only change its own environment variables.
The environment variables are not persistent: if you set them in your login session and then log out, you'll need to set them again in your next session. To set an environment variable persistently, you'll need to add a command to set the variable in your login script, so that the variable will be automatically set as you want it each time you log in.
MK
MK