What is the file /etc/rc.local for?

Linux File Reference: /etc/rc.local

The /etc/rc.local file is common to major Linux distributions.

This file contains BASH commands which will be run after run-level specific commands whenever the system is booted.

In a VPS environment, /etc/rc.local is commonly used to store the hostname <SERVER_HOSTNAME> command (where <SERVER_HOSTNAME> is the intended hostname for the VPS) to ensure that the VPS hostname is not reset when the VPS is rebooted.