I'm running Ubuntu 14.04. I've created a script called startup.sh
and given it execute permissions. I put it in my $HOME/bin
folder, and I've checked and this is indeed on the PATH
. I've rebooted my computer just to be sure. I am still unable to run startup.sh
just as a command (typing startup
on the command line). Am I wrong in what I've done or assumed is possible?
My end goal was to be able to just type on the command line "startup" and execute the script I created.
$ startup
startup: command not found
$ echo $PATH
/home/travis/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ cd /home/travis/bin && ls -l
total 4
-rwxrwxr-x 1 travis travis 803 Dec 16 10:08 startup.sh
I can still run the script by navigating to $HOME/bin and running bash startup.sh
of course, but that wasn't the goal.
Setting executable permissions and a #!/bin/bash
line per How do I run a shell script without using "sh" or "bash" commands? did not work for me as an answer, hence my confusion.