LinuxQuestions.org
Help answer threads with 0 replies.
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 12-03-2006, 03:03 AM   #1
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Rep: Reputation: 32
how can i run acommand in every startup


hello all,

can any body tell me how can i run acommand everytime the machine start at the start up something like intializing aspecific service > /opt/lammp/lammp start who can i get that working every time machine started and thanx
 
Old 12-03-2006, 03:09 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Put the command in /etc/rc.local on most systems. When I used SuSE 9.3 it didn't have rc.local, so if that's not been changed you'll have to write a little init script and put it in /etc/init.d (use one of the other scripts as a template, ideally one that starts up in your target runlevel) then if you've got all the requisite header information use 'chkconfig <myservice> on" where <myservice> is the name of the file.
 
Old 12-03-2006, 03:10 AM   #3
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
there is a local.start file with your init scripts that you can add commands to for startup.

I don't know exactly where SusE puts it, but it is usually in one of the following locations

/etc/rc.d/
/etc/init.d/
/etc/conf.d/
 
Old 12-03-2006, 04:54 AM   #4
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanx for all

ye it works i found it /etc/init.d then i put the command in boot.local file and it works thanx agin
 
  


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
k3b startup will not run as anyone! mpoland Linux - Software 0 08-27-2004 04:15 PM
Run a script at startup iain.ross Linux - Newbie 8 08-27-2004 04:03 PM
Getting daemon to run at startup HaPPYFaCe Slackware 1 07-10-2003 08:50 PM
I want MySQL to run at startup WorldBuilder Linux - General 12 06-14-2003 01:45 AM
Run on Startup? Paasan Linux - General 5 09-16-2002 10:37 AM

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

All times are GMT -5. The time now is 04:44 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