How can I permanently change PATH variable in Ubuntu 20.04? [duplicate]

How can I permanently change PATH variable in Ubuntu 20.04?

What file should I modify?

Thank You


You can just add it to your ~/.profile or ~/.bashrc or ~/.THESHELLYOUHAVErc

like adding :

export PATH=$PATH:/some-new/:./another

changing might be more like

export PATH=yourneed1/:yourneed2/ 

without the existing one $PATH

but you need to adapt that to your own needs

you have to logout or reload the file source ~/.profile once, it is not instantly done ;) (similar with .bashrc)