Skip to content
Advertisement

How to set PATH in Ubuntu 17.10 for custom path

I made a folder called bin in /home/USER/bin on this, I created a file called hello ( for example) with this code:

JavaScript

I did execute export PATH=$PATH":$HOME/bin" and then $ . ~/.bashrc, but when I restarted the PATH is restored to default.

How can I resolve it?

Thank you!

Advertisement

Answer

The user bin directory should already be added to your path by the ~/.profile script.

JavaScript

Did you add the export line to your ~/.bashrc file?

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement