Im using gedit to type my script as an assignment and one of the questions is adding my home directory to the BEGINNING of the path variable and I'm not sure how to do this
Asked
Active
Viewed 457 times
0
-
1What have you tried? What language are you scripting in? Gedit has nothing to do with this, which is basically asking “how to change the PATH variable” – D. Ben Knoble Oct 20 '19 at 16:52
-
1im using /bin/bash – user377196 Oct 20 '19 at 16:54
-
1Possible duplicate of [How to correctly add a path to PATH?](https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path) – D. Ben Knoble Oct 20 '19 at 17:08
1 Answers
2
Simple way would be to use:
PATH=$HOME:$PATH
Jeff Schaller
- 66,199
- 35
- 114
- 250
Vincent Achard
- 340
- 1
- 5