Add a directory to path

I used Pip to install some programs, the programs installation folder is not added to the path. How would I go about adding it?

1 Like

In your home directory, press ctrl-h to make dot files/folders visible. Open.bashrc in a text editor and add a line according to the pattern below at the end of the file:

export PATH=/path/to/directory:$PATH

Replace /path/to/directory with the real path to the directory. Save and close the file. Run:

source ~/.bashrc


Thank you man :slight_smile:

You are welcome!

And welcome to EnOS forum!

I would add it to /etc/environment

I have to correct myself. /etc/environment will not work because it is not expanding variables like $PATH and hence it can not add values to an existing variable.

With that said your are left with the other options mentioned in the Arch wiki.

1 Like