Set Envonment Variable in Linux

From Cramsession
Revision as of 15:32, 19 July 2024 by Mflavell (talk | contribs) (Created page with "=Displaying a Varable= echo $VARABLENAME =Setting a Varible= export VARIABLE_NAME=value =Make Varable Persistant= Add to bash RC: vi ~/.bashrc Source it source .bashrc Open a new session to test =References= https://www.freecodecamp.org/news/how-to-set-an-environment-variable-in-linux/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
✍️ Verified Author: MflavellClick to view professional profile & credentials

Displaying a Varable

echo $VARABLENAME

Setting a Varible

export VARIABLE_NAME=value

Make Varable Persistant

Add to bash RC:

vi ~/.bashrc

Source it

source .bashrc

Open a new session to test

References

https://www.freecodecamp.org/news/how-to-set-an-environment-variable-in-linux/