Setting environment variables on startup

To have environment variables be set after each login the script with this format must be put as a startup script:

#!/bin/bash

cat << 'EOF' >> /etc/environment
SECRET1='SECRET1VALUE'

SECRET2='SECRET2VALUE'
EOF

Last updated

Was this helpful?