Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to understand executable files. Some of the files in my /etc/rc.d have permission of execute and others do not. Are only the ones with permission set for execute(-rwx--x--x) used at startup. Are all of the other shell scripts(-rw-r--r--) in there dormant, in the sence that they need to change their permissions to be used?
I asked this because I added a firewall script to /etc/rc.d that Guarddog created. Which seems to be working(firewall starts at bootup). I wasn't sure if making something exacutable was just about changing the permissions.
I think only files ending with .sh and having the executable bit set are executed in rc.d at startup - at least this is how things work in FreeBSD, and maybe in Linux, too.
Thus rc.d may contain sample scripts that are not executed at startup, since they do not end with .sh.
Sorry for misleading you, but I took a look at /etc/rc.d of my Linux machine, and I saw there virtually no files ending with .sh, so Linux works differently.
However, I am sure that only files having the executeablebit set are executed there.
Looking in my /etc/init.d and /etc/rc.d/rc5.d directories, all of the listed files have the executable bits set. The files that run on startup or shutdown are the links in the /etc/rc.d/rc<runlevel>.d directories. They will point to programs (scripts) in the /etc/init.d directory. The S<num> prefix will determine the order they will start.
A binary program or script needs the x bit set to run. The .bin extension is usually added to let you know that it is an executable. For example, the netscape install program ends with the .bin extension, to remind you to use chmod +x on the file after downloading it.
Unix/Linux file systems don't have the text/binary file type distinctions that MSDOS / Windows does.
Exactly - extensions are purely descriptive for the most part (though some programs are coded to look for certain ones) and the only files that will execute are those that have the executable bit. However, some configuration files will be read by an executable and have the *effect* of being commands. But, in essence, it's an on/off thing - chmod 600 a binary and it won't run. Chmod 700 a script and it will. Of course, if you chmod a grocery list to execute bash'll just spew a lot errors - but it will 'execute'.