I made a folder called bin in /home/USER/bin on this, I created a file called hello ( for example) with this code:
#!/bin/bash
echo My first program
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!
The user bin directory should already be added to your path by the ~/.profile script.
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
Did you add the export line to your ~/.bashrc file?
export PATH="$HOME/bin:$PATH"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With