Wurst_User You can set environment variables on Debian-like Linux distributions in several ways. Here are two common methods:
Setting Environment Variables in /etc/environment:
This file is used to set system-wide environment variables. You can add a new variable by just editing the file.
Setting Environment Variables in Shell Initialization Files:
You can also add environment variables in shell initialization files such as ~/.bashrc
or ~/.profile
, although I'm not 100% sure that those would be visible to Wurst.
Open ~/.bashrc
in a text editor. For instance, using nano:
nano ~/.bashrc
Add your environment variable in the form export NAME=VALUE
. For example:
export WURST_OPENAI_KEY=sk-1a2b3c4d5e6f7g8h9i0j
Save and close the file. The changes will take effect at the next login or you can use the source command to apply the changes immediately:
source ~/.bashrc
Please note that these changes will apply to all users on the system if you add them to /etc/environment
or ~/.bashrc
of the root user. If you want to apply them only to a specific user, add them to that user's ~/.bashrc
file.