?
Solved

autoexec.bat equivalent in linux?

Posted on 2003-03-20
10
Medium Priority
?
1,488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

743 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