Set environment variable permanently on Ubuntu

Posted on December 9, 2019

Run the command

sudo -H gedit /etc/environment

Set the variable like that

VARIABLE="value"

To take effect the changes you have to logout as user and login again.