LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-13-2011, 03:36 PM   #1
venom4u31
Member
 
Registered: Oct 2011
Distribution: Debian 6
Posts: 47

Rep: Reputation: Disabled
What are the scripts accessed by the computer when linux starts up?


I would like to know the location of the files that linux uses when it starts up.

L.E. I would prefer for the ubuntu version.


Even more speciffic: Can you tell me if it is among either of those files?


/etc/startup
/etc/bash/startup
~/.start.rc
~/.profile
/etc/profile

Last edited by venom4u31; 11-13-2011 at 03:58 PM. Reason: Apparently it matters what distribution of linux is. I made changes as requested.
 
Old 11-13-2011, 03:46 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839
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.
 
1 members found this post helpful.
Old 11-13-2011, 03:50 PM   #3
venom4u31
Member
 
Registered: Oct 2011
Distribution: Debian 6
Posts: 47

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
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.
If you find out about Ubuntu, please tell me.
 
0 members found this post helpful.
Old 11-13-2011, 04:52 PM   #4
the dsc
Member
 
Registered: May 2009
Distribution: Debian
Posts: 164
Blog Entries: 161

Rep: Reputation: 35
I don't really know anything about upstart, but it seems that the scripts are also on /etc/init.d:

http://upstart.ubuntu.com/getting-started.html

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.

Last edited by the dsc; 11-13-2011 at 04:57 PM.
 
Old 11-14-2011, 09:43 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,133

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
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.

Last edited by schneidz; 11-14-2011 at 09:45 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write a batch file for windows that starts cygwin tool and runs unix scripts plasya777 Programming 5 05-04-2009 07:53 AM
HP OfficeJet on another computer (across table) cannot be accessed. herbie643 Linux - Hardware 8 08-10-2008 03:24 PM
Computer starts up but then shuts down immediately memo007 Linux - Hardware 18 02-25-2008 07:24 AM
Computer Starts Up All By Itself - How To Disable? rrrssssss Linux - Hardware 4 02-16-2006 08:39 AM
Running Scripts When Modem Starts Up Angelis Linux - Newbie 2 08-31-2003 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration