How to Set a Web Env Variable From the Command Line on Linux/Unix
Nov 3 · 2 min read
Are you a full-stack PHP developer? Chances are that you might want to easily override an environment variable through the command-line interface.

Let’s say you are writing a bash script to automate a certain process: your Docker containers must be rebuilt, and the app’s DB_HOST and REDIS_HOST variables must be updated accordingly.

