How to add/set enviroment variables or paths in Garuda?

I have just installed XAMPP 7.4.19, it's working perfectly but I'm unable to set environment for php. I also looked at the few URL(s) mentioned below:
https://wiki.archlinux.org/title/environment_variables

but still no success :worried:
The thing which worked for me is

set PATH $PATH /opt/lampp/bin:$PATH

But it is not a great solution as it stops working after session gets expired. In which file should I paste this code?

https://fishshell.com/docs/current/tutorial.html#startup-where-s-bashrc

6 Likes

@jonathon Do I need to paste the line in end of the file or in a specific function?

Did you read the page I just linked to? If not, please do so rather than expecting people to copy-paste answers that already exist.

3 Likes

Wow you got Garuda Linux's answer in StackOverflow! nice :smiley:

In Garuda, fish's config is automatically set to read ~/.profile. fish doesn't read ~/.bashrc by default since it's not bash.

3 Likes

Thanks I was just focusing only on the code. I totally ignored this line.

It is possible to directly create functions and variables in config.fish file

Really, haste is not a good for such kind of tasks. Now I guess, I need to read about initialization for organizing my configuration.

1 Like

Oh, I see. Thanks for information. :smiley:

90% of issues can be resolved by reading more closely. :wink:

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.