Where is log file from rc.local?

Unless a command has output or logging already configured, rc.local commands will not log anywhere.

If you want to see logs for specific commands, try redirecting the stdout and stderr for rc.local to somewhere you can check. Try adding this to the top of your /etc/rc.local file:

exec 1>/tmp/rc.local.log 2>&1  # send stdout and stderr from rc.local to a log file
set -x                         # tell sh to display commands before execution

Though this will require to rerun the rc.local file.


Try to check for failures in the /var/log/syslog file instead.


With systemd rc.local is considered a service fo which systemd collects logs. You can review them with:

systemctl status rc.local.service

You can see errors (if they exist) through service log.

Tags:

Boot

Log