Linked Questions

2 votes
0 answers

Is there something like rc.local in systemd? [duplicate]

Back with system V init there was a script called rc.local where you could stuff commands that needed to be run during bootup, which would not fit to one particular service. Does systemd have a ...
Arne's user avatar
  • 813
174 votes
2 answers

How does systemd use /etc/init.d scripts?

I just switched to debian jessie, and most things run okay, including my graphical display manager wdm. The thing is, I just don't understand how this works. Obviously my /etc/init.d/wdm script is ...
Martin Drautzburg's user avatar
95 votes
4 answers

Purpose and typical usage of /etc/rc.local

The header looks like this: #!/bin/sh -e # # rc.local - executed at the end of each multiuser runlevel # # Make sure that the script will "exit 0" on success or any other # value on error. What is ...
Emanuel Berg's user avatar
  • 6,773
31 votes
2 answers

What's the difference between /etc/rc.local and /etc/init.d/rc.local?

I want to add a permanent iptables rule to my new VPS, and after brief google search i was surprised that there are two places this rule can be added, that seems like identical: /etc/rc.local and /etc/...
grigoryvp's user avatar
  • 413
4 votes
3 answers

How can I run a program as a root user when my Ubuntu 15.04 machine starts up?

On Ubuntu 15.04 I have this file: /usr/local/bin/myscript (it's a script I made). If I run this command under my account, it will do what I need it to do as a root user: sudo /usr/local/bin/myscript ...
user2580's user avatar
15 votes
3 answers

How can I use a USB keyboard or mouse to wake from suspend?

I am using GNOME 3.36.6 on Arch Linux. By default, GNOME's automatic suspend option is enabled and it works as expected. However, I have to press the power button to wake the computer from suspend. I ...
sjy's user avatar
  • 826
3 votes
3 answers

Why does `init 0` result in "Excess Arguments" on Arch install?

I am used to the old method of calling init 0 to shutdown. Bad, I know; but when I tried it on my new Arch install I get this: # init 0 Excess Arguments This confuses me because I thought systemd ...
prolificslacker's user avatar
5 votes
2 answers

How can I make Debian run m python script at startup?

I have this script in my home folder (pi): How could I make Debian run this script at startup so I don't need to log in and run it manually?
Jason94's user avatar
  • 459
2 votes
3 answers

Fedora 33 - Run command or script at startup

In 2020 (last day today too), Fedora 33, what is the ideal way to run a command or script at startup? I am asking this again because over the years I have seen several different ways of doing it, some ...
olfek's user avatar
  • 711
3 votes
2 answers

Why doesn't my blockdev config change execute from rc.local on reboot

I am (probably obviously) a relatively new Linux user, so I'm already bracing for the barrage of "why aren't you doing it this way instead..." comments. I'd love to hear them...but I would also really ...
DCaugs's user avatar
  • 133
0 votes
2 answers

rc.local Not working Debian 8

I'm trying to start a Shell Script on boot/startup I tried to edit the /etc/rc.local file, but it didn't work #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser ...
IchSkill's user avatar
1 vote
2 answers

If rc.local is run as root why can't it touch a file

I wish to execute a script every time on boot-up using /etc/rc.local. My script for example is called which is stored in /home/debian as below. It first tries to create a file called ...
Engineer999's user avatar
  • 1,121
0 votes
1 answer

inittab respawn and rc.local

At the moment I have a daemon starting at boot using rc.local by the following line. su -l user -c '/dir/daemon' but I would like to start this process as a service with respawn. I found out that it ...
Kuravi H's user avatar
0 votes
1 answer

Linux CentOS: run rc.local after boot

I am running a CentOS (Red Hat Enterprise Linux Server release 7.6 (Maipo)) instance on AWS. I need to add to my boot sequence execution of a rc.local script. How can I do that? I have looked in /ect/...
Andrey Ramnikov's user avatar
0 votes
2 answers

How can I run an executable text file at system startups?

sudo nano /etc/rc.local I have run the above and added the path below. HDD_temp is an executable text file. /home/matthew/@/HDD_temp/HDD_temp However, the file is not run at system startups. How ...
Matthew Wai's user avatar

15 30 50 per page