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, mac, terminal, tips

How to clear the input of the current command line on the terminal of Linux or Mac?

How to clear the current command line in Linux or Mac terminal? For example, if you typed a bunch of instructions wrongly, and you want to clear them, Be sure to do the same as I used to, use the reverse key to kill slowly, we can use...

linux

How to install the monitor tool htop on CentOS

Htop is a free (GPL) ncurses-based program monitor tool for Linux. It is similar to top, but allows you to scroll vertically and horizontally, so you can see the full command line running on the system, And you can view them as program trees, select multiple programs and operate them.

linux,system

Detect whether selinux is enabled in the system

Detect whether selinux is enabled in the system