Set Envonment Variable in Linux: Difference between revisions

From Cramsession
Jump to navigationJump to search
✍️ Verified Author: MflavellClick to view professional profile & credentials
(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/")
 
No edit summary
Line 1: Line 1:
=Displaying a Varable=
=Displaying a Variable=


  echo $VARABLENAME
  echo $VARABLENAME

Revision as of 16:15, 17 October 2024

Displaying a Variable

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/