Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I make Ubuntu execute a script or program at startup?

0
Posted

How can I make Ubuntu execute a script or program at startup?

0

If you need to execute something after you log into your Gnome session, then all you need to do is choose System>Preferences>Sessions from the menu, choose the “Startup Programs” tab, and add the path to whatever script/program you want to run at startup of session. If you need to run the script at boot time, before the GUI even loads, then it’s time to learn about the linux runlevel system. This page and this page will teach you in some detail about it. Here I will tell you about the basics very briefly. • The startup/shutdown scripts all live in directory /etc/init.d • Linux systems can operate in several “runlevels”. The default Ubuntu runlevel is 2. • Runlevel configuration is done by placing links from /etc/rcX.d/ to scripts in /etc/init.d (where X is the number of the runlevel) • The link naming convention is that the ones that start with S run at startup, ones that start with K run at shutdown, and the numbers allow you to specify the order in which the scripts run. • The progra

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.