How to change timeout in systemctl

I had a similar problem and was scratching my head over the lack of Google results (after ending up at this page a few times), so I decided to just read up on how systemd works here.

Eventually I figured out that networking is actually a SysV init script (/etc/init.d/networking), which is converted to a systemd service at runtime (/run/systemd/generator.late/networking.service), so you can't just modify an existing script.

Instead you have to override it with a file at e.g. /etc/systemd/system/networking.service.d/reduce-timeout.conf, in your case containing:

[Service]
TimeoutStartSec=15

On a system running Debian Jessie, I was able to append the following code to the file located at /lib/systemd/system/networking.service.d/network-pre.conf

[Service]
TimeoutStartSec=15

This changed 'no limit' to a limit of 15 seconds, making the system boot much faster if network is disconnected.

Creating a file in /etc/systemd/system/networking.service.d/ did not have any effect on this system, so I edited the existing file in the /lib/systemd/system/networking.service.d/. If this directory is empty, creating a new .conf file with the code above should work.

Not sure why this is different or if it's even the correct way to configure such a thing.


I had a similar problem, and it turns out my system was trying to connect to Wi-Fi. My solution involved changing this line in /etc/network/interfaces:

auto wlan0

to:

allow-hotplug wlan0