With Raspbian, network interfaces are managed with dhcpcd by default. If you want to start interfaces manually then you should first disable its service with:
rpi ~$ sudo systemctl disable dhcpcd.service
rpi ~$ sudo systemctl reboot
This ensures that the interface isn't started on boot first and then disabled by a job. You can start an interface with:
rpi ~$ sudo dhcpcd -w eth0
eth0: waiting for carrier
eth0: carrier acquired
DUID 00:01:00:01:25:1e:c1:bd:dc:a6:32:01:db:ed
eth0: IAID 32:01:db:ec
eth0: adding address fe80::77c0:a4bd:e655:5427
eth0: rebinding lease of 192.168.50.137
eth0: probing address 192.168.50.137/24
eth0: soliciting an IPv6 router
eth0: leased 192.168.50.137 for 3600 seconds
eth0: adding route to 192.168.50.0/24
eth0: adding default route via 192.168.50.1
forked to background, child pid 676
For the command to manage the USB interfaces you should create a systemd Unit file:
rpi ~$ sudo systemctl --force --full edit disable-usb.service
In the empty editor insert these statements:
[Unit]
Description=Disable USB interfaces
After=sysinit.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c 'echo 0 > /sys/devices/platform/soc/3f980000.usb/buspower'
ExecStop=/bin/bash -c 'echo 1 > /sys/devices/platform/soc/3f980000.usb/buspower'
[Install]
WantedBy=sysinit.target
Enable the new service and monitor it with:
rpi ~$ sudo systemctl enable --now disable-usb.service
rpi ~$ systemctl status disable-usb.service
The service will run on boot up and disable the USB interfaces. You can enable/disable them manually with:
rpi ~$ sudo systemctl stop disable-usb.service
rpi ~$ sudo systemctl start disable-usb.service