Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

autoexec.bat equivalent in linux?

Posted on 2003-03-20
10
Medium Priority
?
1,533 Views
Last Modified: 2013-12-15
I need to start a programme automaticaly at start up. And RC.D doesn't seems to do the trick. Is there some sort of autoexec.bat like file in linux?
0
Comment
Question by:ComMaster
10 Comments
 

Expert Comment

by:DracoX
ID: 8177225
You'll probably need to post some more details, including:

Distro and version of Linux
What type of program you're trying to start up
How you tried to get it working with rc.d in the first place
etc
0
 
LVL 3

Expert Comment

by:sigel1
ID: 8178672
here is how to track it yourself
/etc/inittab
it will say in it
id:3:initdefault:
or some number in their
they are start up options
in their also their is an option
rc:2345:wait:/etc/rc.d/rc.M
or somethign like that
the 2345 is the options like choice in ms-dos
and /etc/rc.d/rc.M is my file that it called
in teh file your system calls is where you can edit things
don't mess much with inittab because it is what boots your system.  Just use it to get you info about how your system is set up to boot.

0
 

Expert Comment

by:Spurgeon
ID: 8179851

rc.M is for multiuser only, if you always start in single user mode rc.S , it won't work. Besides that, the files rc.M rc.S rc.K and so on do exist on slackware systems only. why i know this? because i use slackware myself :)
Try to search for a like like rc.local it exists on almost every linux-system. type: find / -name rc.local or find / -name rc.*
now your system starts a search for the file
if it's found, for example in: /etc/rc.d/rc.local
just take a text-edit like vi and type vi /etc/rc.d/rc.local and add the file you want to execute.

make sure, you have the complete path in your rc.local
for example /usr/sbin/modprobe (options)

Good luck,

Greetz spurgeon

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 51

Expert Comment

by:ahoffmann
ID: 8183934
when dou you want to start you your programs:
  1) at/after boot of system
  2) when a user logs in
these are 2 completely different things
0
 

Expert Comment

by:mjregan
ID: 8185117
It would be helpful if you said what programs you wanted to run and when you wanted them to start. However, here are some general pointers.

As already mentioned, the /etc/rc.d/rc.local or /etc/rc.d/boot.local in SUSE, will start programs after booting but before going to the final runlevel.For SUSE you just create a link in the /etc/rc.d/rc[runlevel].d/  to the startup script to start an application at startup.

The /etc/profile contains commands that start after the runlevel is reached. These commands become global in nature. I do things like setting up alaises, exporting some variables and setup the $PATH there.

Then there is the the /home/username/.profile file. It will run each time the user logs on. It only runs applications that the user has permission to run.

If you are using X-windows the desktop will have its own startup file as well.
0
 

Expert Comment

by:arvsrv
ID: 8216003
you must edit /etc/rc.d/rs.sysinit
and then restart system
0
 

Expert Comment

by:CleanupPing
ID: 9079528
ComMaster:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9083595
sevaral suggestions, and no response at all: split points and no refund
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 10040315
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ - no points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

paullamhkg
EE Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10108139
PAQed - no points refunded (of 50)

modulo
Community Support Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month13 days, 5 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question