rc.local
What rc.local Is Used For¶
rc.local is a traditional Linux startup script executed near the end of boot with root privileges. In this project, it is mainly useful for:
- Bringing up routes or CAN interfaces at boot
- Setting network priority
- Running repeatable initialization commands before user login
Ubuntu 22.04 Notes¶
Ubuntu 22.04 does not enable rc.local by default. You need to create the file and enable the service manually.
Create /etc/rc.local¶
Enable the rc-local Service¶
Then edit:
Make sure the [Install] section contains:
Start and Enable the Service¶
If the status shows active (running), the service is available.
Add Your Boot-Time Commands¶
Edit:
Example:
Make sure exit 0 is present at the end.
Typical Use Cases in This Project¶
- Network priority adjustment for the MID360 NIC
- Static route restoration after reboot
- Chassis or arm CAN setup commands