Practical Configuration
As a developer writing any kind of software service, you are likely aware of environment variables: shell values that are set like variables in any other programming language. If you are totally unfamiliar with environment variables, skip ahead to the Shell Scripting chapter before returning here.
The modern approach is to use environment variables as the primary way to configure services – they make it easy to specify configuration in container environments, without worrying what the file system inside them looks like.
Most standard Unix environments use environment variables as a means to specify common configuration that’s relevant to many different programs, not just one. For example, environment variables keep track of where the user’s home directory can be found ($HOME
), what the current working directory is ($PWD
), what shell should be used by default ($SHELL
), where to look for the executable files that correspond to commands received...