Skip to main content
added 157 characters in body
Source Link
Michael Hampton
  • 9.1k
  • 2
  • 34
  • 58

Use After in the [Unit] section to specify what should be started before your own service. (This much of the previous answer is correct.)

To start your service after the network is up, use the network target, which should apply whether you use NetworkManager, the conf.d/netctl system in Arch, or some other service that systemd is aware of.

[Unit] #..... After=network.target 

A brief look will confirm that every other service on your system that relies on network connectivity contains this directive.

It is also portable to any distribution which uses systemd. Your unit file will be the same for Arch, Fedora, RHEL 7, future versions of Debian...


Services which start a network connection, such as Arch's scripts or your own, should specify so in their own unit files.

[Unit] Wants=network.target Before=network.target 

Use After in the [Unit] section to specify what should be started before your own service. (This much of the previous answer is correct.)

To start your service after the network is up, use the network target, which should apply whether you use NetworkManager, the conf.d system in Arch, or some other service that systemd is aware of.

[Unit] #..... After=network.target 

A brief look will confirm that every other service on your system that relies on network connectivity contains this directive.


Services which start a network connection, such as Arch's scripts or your own, should specify so in their own unit files.

[Unit] Wants=network.target Before=network.target 

Use After in the [Unit] section to specify what should be started before your own service. (This much of the previous answer is correct.)

To start your service after the network is up, use the network target, which should apply whether you use NetworkManager, the conf.d/netctl system in Arch, or some other service that systemd is aware of.

[Unit] #..... After=network.target 

A brief look will confirm that every other service on your system that relies on network connectivity contains this directive.

It is also portable to any distribution which uses systemd. Your unit file will be the same for Arch, Fedora, RHEL 7, future versions of Debian...


Services which start a network connection, such as Arch's scripts or your own, should specify so in their own unit files.

[Unit] Wants=network.target Before=network.target 
added 139 characters in body
Source Link
Michael Hampton
  • 9.1k
  • 2
  • 34
  • 58

Use After in the [Unit] section to specify what should be started before your own service. (This much of the previous answer is correct.)

To start your service after the network is up, use the network target, which should apply whether you use NetworkManager, the conf.d system in Arch, or some other service that systemd is aware of.

[Unit] #..... After=network.target 

A brief look will confirm that every other service on your system that relies on network connectivity contains this directive.


Services which start a network connection, such as Arch's scripts or your own, should specify so in their own unit files.

[Unit] Wants=network.target Before=network.target 

Use After in the [Unit] section to specify what should be started before your own service. (This much of the previous answer is correct.)

To start your service after the network is up, use the network target, which should apply whether you use NetworkManager, the conf.d system in Arch, or some other service that systemd is aware of.

[Unit] #..... After=network.target 

Services which start a network connection, such as Arch's scripts or your own, should specify so in their own unit files.

[Unit] Wants=network.target Before=network.target 

Use After in the [Unit] section to specify what should be started before your own service. (This much of the previous answer is correct.)

To start your service after the network is up, use the network target, which should apply whether you use NetworkManager, the conf.d system in Arch, or some other service that systemd is aware of.

[Unit] #..... After=network.target 

A brief look will confirm that every other service on your system that relies on network connectivity contains this directive.


Services which start a network connection, such as Arch's scripts or your own, should specify so in their own unit files.

[Unit] Wants=network.target Before=network.target 
Source Link
Michael Hampton
  • 9.1k
  • 2
  • 34
  • 58

Use After in the [Unit] section to specify what should be started before your own service. (This much of the previous answer is correct.)

To start your service after the network is up, use the network target, which should apply whether you use NetworkManager, the conf.d system in Arch, or some other service that systemd is aware of.

[Unit] #..... After=network.target 

Services which start a network connection, such as Arch's scripts or your own, should specify so in their own unit files.

[Unit] Wants=network.target Before=network.target