by Devin Yang
(This article was automatically translated.)

Published - 4 years ago ( Updated - 4 years ago )

Save .env content to system environment variables
For example, I have a .env file with the following contents:
test1=abc
test2=def
Execute the following command:
export $(grep -v '^#' .env | xargs)
You can see this environment variable on your host side.
Execute env to view
env

Tags: linux

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux,system

Detect whether selinux is enabled in the system

Detect whether selinux is enabled in the system

linux

How to change timezone on RHEL 7/CentOS7/Fedora

On the new version of RHEL 7/CentOS 7 or Fedora, we can check the status and make adjustments through timedatectl.

linux

Multiple ssh configuration files for public key authentication

When we use ssh public key authentication, we usually add relevant settings in ~/.ssh/config. If some are used by the company or at home, can multiple configs be used? In fact, it is possible. We can use git to load the company-shared, version-controlled config through Include.