How to set export PATH="$HOME/neovim/bin:$PATH" automatically

I’m on a Raspberry Pi 5 and I had to build from source to get the latest stable version. The program built successfully and I’m able to run it just fine. However whenever I open a new terminal I have to run the command export PATH="$HOME/neovim/bin:$PATH"before I can use the program as normal. How can I set my terminal to automatically run this command when I open it, without having to type it in manually. Please explain it as if I’m a completely new user. Thank you in advance for the help.

Asked By: madderhatter


This depends on the shell that you are using but if it is bash then as said by @Friendrich you can add at the end of your ~/.bashrc file the following line:

export PATH="$HOME/Neovim/bin:$PATH"

And reboot your system.

Answered By: Vivian De Smedt
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.