[ Thanks to An Anonymous Reader for
this link. ]
“If you’re wondering why I’m wearing dark sunglasses, a
fake moustache, and a baseball cap (featuring the logo of
professional curling team, The Floating Stones), I’m on the lam.
I’m dodging black remote-controlled helicopters, pasty-white
systems administrators, and the combined forces of many daemons to
bring you some of the best-kept secrets of UNIX® power users.
Don your aluminum foil hat and read on.“Save the environment variables
“Most UNIX users amass settings in shell startup files, such as
.bashrc (for the Bash shell) and .zshrc (for the Z shell), to
recreate a preferred shell environment time and again. Startup
files can create aliases, set shell options, create functions, and
set environment variables. Essential environment variables include
HOME (which points to your home directory), PATH (which enumerates
directories in which to search for applications), and MANPATH
(which lists directories in which to search for man pages). To see
which environment variables are set in your shell, type printenv.
Consult your shell’s man page for a complete list of available
environment variables.“Like the shell, you can customize many other UNIX applications
through environment variables. For example, the Java™
subsystem requires that you define JAVA_HOME to point to the root
of a Java run time. Similarly, the suite of Amazon Web Services
(AWS) utilities mandates the use of AWS_CREDENTIAL_FILE to point to
a file with valid private key credentials. Individual applications
provide environment variables, too. The trick is discovering the
variables. Luckily, the work need not involve breaking and
entering; instead, simply consult the man page of the utility at
hand and look for a separate section titled, “Environment
Variables.””