LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-18-2017, 01:38 PM   #1
elico
Member
 
Registered: Dec 2011
Posts: 145

Rep: Reputation: Disabled
AUTOEXEC.BAT for linux


Hi all

What is the AUTOEXEC.BT equivalnt for LINUX. ?

Elico
 
Old 01-18-2017, 01:39 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656
If you have a non-systemd system then it would usually be /etc/rc.local
 
Old 01-18-2017, 01:41 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,523

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
there is really none
you really DO NOT want that option on a thumb drive or a cd or dvd or flash card

even MS has disabled it
 
Old 01-18-2017, 01:45 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656
Are you confusing autoexec.bat and autorun?
 
Old 01-18-2017, 02:08 PM   #5
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
What is "non-systemd system" ?
Elico
 
Old 01-18-2017, 02:11 PM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656
What version and what distro do you have?
 
Old 01-18-2017, 02:25 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,618

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
systemd does have a rc.local service. In a nutshell rc.local in the olden days ran as the last script before the desktop started. Another way is to use crond via @boot.

However, it depends on what you are trying to accomplish? Are you trying to autostart a GUI application?
 
Old 01-18-2017, 03:12 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by elico View Post
What is "non-systemd system" ?
Elico
Open a terminal and issue:
Code:
cat /proc/1/comm
it will tell if you are on a systemd or init-based system.

If the result says init, then an /etc/rc.local file, if present and and enabled can be considered an "auto executing" batch file, of sorts.
The commands in the file execute after services start but before a GUI Desktop, (or its Login Manager).

So. Before user, after system, rc.local
After user logs in, ~/.config/autostart/ for (few,some,all) recent desktops also has cmd.desktop entries.
Those will load after logging in to the desktop.

Have Fun.

Last edited by Habitual; 01-18-2017 at 03:14 PM.
 
  


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
What is the autoexec.bat and config.sys equivalent of linux lemuel Linux - Newbie 4 12-07-2004 09:34 PM
Linux Startup - AutoExec.bat equivalent? perry Linux - Software 6 05-03-2004 11:13 PM
Autoexec.bat in Linux? sikandar Linux - Software 10 08-31-2003 12:30 PM
autoexec.bat analogous for linux?.... amod Linux - Newbie 2 06-18-2003 05:49 AM
The Linux version of autoexec.bat ??? Canaris Linux - Newbie 9 05-27-2003 07:35 AM

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

All times are GMT -5. The time now is 05:41 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
Open Source Consulting | Domain Registration