Eu usaria os comandos nmcli
para essa finalidade:
nmcli nm enable false && nmcli nm enable true
página man:
DESCRIPTION
nmcli is a command‐line tool for controlling NetworkManager and report‐
ing on its status. It is not meant as a full replacement for nm‐applet
or other similar clients but as a complementary utility to those pro‐
grams. The main usage for nmcli is on servers, headless machines or
for power users who prefer the command line.
[...]
nm NetworkManager
Use this object to inquire and change state of NetworkManager.
[...]
enable [true|false]
Get networking‐enabled status or enable/disable network‐
ing by NetworkManager. All interfaces managed by Net‐
workManager are deactivated when networking has been dis‐
abled.
Reference to D‐Bus:
interface: org.freedesktop.NetworkManager
method: Enable
arguments: TRUE or FALSE