Creating a Startup Service

Use systemd to create a startup service.

The following example shows you how to create a systemd startup service that changes the maximum transmission unit (MTU) of the default Ethernet connection, eth0.

  1. Concatenate the following block of code into a file:
cat << EOF >> /lib/systemd/system/eth0.service
	Description=Network interface initialization

	ExecStart=/usr/sbin/ifconfig eth0 mtu 1460 up

  1. Set the service to auto-start when the system boots:
cd /lib/systemd/system/
	ln -s ../eth0.service eth0.service
Last modified November 8, 2023: Update (3799256)