export $(cat .env | xargs)

Category: Environment & Config

export $(cat .env | xargs)

Load variables from a .env file into the current shell

Reads all key=value pairs from a .env file and exports them as environment variables in the current shell.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.