Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The executable bit is a part of the filesystem that tells the system that the file can be executed (or run). There are also bits for reading and writing. These bits can be turned for any combination of the owner of the file (u for user), the group that owns the file (g) and others (o).
Code:
chmod u+x ~/bin/scriptname
will turn on the bit for user (or owner). You can also set the bits for all three at once by leaving off the u.
"star" at the end means that you script is executable, e.g. has 'x' in its attribute. Could you post exact output of:
echo $PATH
BTW: your shell prompt configuration doesn't really matter on the output of shell commands.
Path looks good: directory "/home/<USER_NAME>/bin" is there. Make sure that your script is in this directory.
'cd' to any other directory and do "ls /home/<USER_NAME>/bin", and you must see you script in the list. If this
is the case you should be able to execute the script from any location.
That is really strange! For the sake of the experiment, try to move your '/home/USER_NAME/bin' at the end of the path.
You could do it by manipulating PATH variable in your .bashrc and .bash_profile in home directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.