What are the scripts accessed by the computer when linux starts up?
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.
That depends on the distribution you use. Some use the System V init system, like Debian. Those store the scripts usually in /etc/init.d.
Other distros use a more BSD like init system, like Slackware, which is storing the scripts in /etc/rc.d.
Ubuntu and derived distros usually use Upstart as init system, I don't know where it stores the scripts.
Fedora uses Systemd, which has its modules written in C, as far as I know.
That depends on the distribution you use. Some use the System V init system, like Debian. Those store the scripts usually in /etc/init.d.
Other distros use a more BSD like init system, like Slackware, which is storing the scripts in /etc/rc.d.
Ubuntu and derived distros usually use Upstart as init system, I don't know where it stores the scripts.
Fedora uses Systemd, which has its modules written in C, as far as I know.
However, the correct way of changing this sort of thing often is not just creating a script and placing it there, it has to be "installed" through some command. On sysv (debian and some others) it is "update-rc.d", on upstart I don't know. But this link I gave seems to have these instructions.
These files you've listed, if/when they exist, they may be used at some later point on the startup anyway. But there will be quite a bit of stuff that happens before these are executed, if/when they are.
if you want to add something to startup i would edit this file (e.g.-):
Code:
xbmc@XBMCLive:~/win/stuff/clips$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo USB0 | tee /proc/acpi/wakeup &
/home/xbmc/bin/masq.ksh &
/home/xbmc/bin/random-vid.ksh &
/home/xbmc/bin/onion.ksh &
exit 0
another possibility would be to add an @reboot line to the users crontab.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.