Environment Variables


im new to Haiku and i am really impressed.
I have a few questions:

  • How and where do i set enviroment variables or PATH variables in Haiku? So i can run “gcc” from the terminal from everywhere?

  • Is there an api documentation for Haiku? Like msdn for Windows?

  • I have Haiku installed on my Notebook and i have trouble getting my WiFi up and running. I have a Lenovo ideaPad 320S Notebook with a Qualcom Atheros QCA9377 802.11ac Network Adapter onboard. When i look under Devices in Haiku it is listet. When i look under Devices in the Details tab, it says “Driver used: unknown”.
    How do i install it properly?

Would be really nice if someone could help me.


Hi and welcome,

  1. you can run gcc from everywhere
  2. the api found you under api.haiku-os.org.
  3. It can be that for your Wifi is no driver available.
    Please read the docu file on your Desktop and haiku-os.org.

Also you can look for some Help in
besly.de and old.besly.de
There is also is software repo from besly under software.besly.de

Regards lorglas

1 Like

Hello and welcome!

About your gcc question, like the previous answer, you can execute gcc compiler from any location. But in case you need to customize some other environment variable, take a look at this document:


Important note: if you are using the 32 bit version, remember that two versions of gcc are provided: the legacy one (gcc 2) and the new one (gcc 8). Remember to type setarch x86 in Terminal before invoke gcc. That will point you toward the new version.

If you are using 64 bit version of Haiku, you don’t need to do that.

Hope it will help you.

Have a nice day and welcome!

1 Like

Thanks for the quick replies, they are helpful.

QCA9377 is not supported yet.

1 Like

You mean something like this?


1 Like

As others have said, you shouldn’t need that for gcc, but I’ve found some places where you do want extra environment variables to be permanently set. For instance, the default search path in Ruby doesn’t include the non-packaged directories one needs to contain locally added modules, so I want to have a ‘RUBYLIB’ variable defined everywhere.

The way to do this is to add the usual ‘export RUBYLIB=“…”’ (or whatever) in the (text) file ‘/boot/home/config/settings/boot/UserSetupEnvironment’.
You’ll find a sample in that ‘…/boot’ directory to start you off.

If you want certain apps to run at boot (I like to have a Terminal and Workspaces running), you can launch them with bash commands added to ‘UserBootscript’ in the same directory (or add them directly to the ‘launch’ folder there).

1 Like

Thank, that’s really helpful.