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


Laravel linux

My mobile computer, install Laravel 8 on Sony xperia 5 II

This is my first Android phone. It's no problem to try to install Laravel. Basically, I installed vim and mariadb. After executing sshd, you can log in through 8022, it is completely a mobile computer: p. The software I use is Termux...

linux,macos

PS aux will you?

For Linux system administrators, you must understand the ps aux command. If you want to be a Linux system administrator, or you are a Linux user, you should understand this command. ps is process status For short, anyone can find out what kind of program is running on the system and how the status is executed through this command. I saw some programs that should not appear, maybe the system was hacked and used to mine🥹

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...