Linux : How to add rc.local in Debian 9

By | October 20, 2017

On Debian 9, the traditional “rc.local” has been deprecated. For traditional Linux users and administrators, there is a way to get it back using SystemD. See the procedure below :

1. Edit the non-existing file “rc-local.service” :

1.1. Add the following content to “/etc/systemd/system/rc-local.service” :

2. Edit the “rc.local” file :

 

2.1. Append the generic content below and save the file :

3. Change permissions :

4. Enable the “rc-local” script on boot :

5. Start the “rc-local” script :

6. Check if any error occurred while starting the service :

You may now append anything you’d like to the traditional “rc.local”.




Be Sociable, Share!