I have exported the PATH but once I switch to a different terminal or reboot Debian, $PATH is reset. Here are the steps I take:
~$ vim scripts.sh
#!/bin/bash
echo "Hello"
I save it as mybash.sh
and chmod with 755. Then I move it to my /root/scripts
directory.
Then:
~$ export PATH=$PATH:~/root/scripts
and it works, but once I reboot Debian, close or switch into another terminal, mybash.sh
cannot be called.
Why doesn't it store PATH permanently?
/usr/local/sbin
, which is included in root's PATH ? – May 21 '15 at 11:29