I'm using Ubuntu Server 20.04 for Raspberry Pi 4, I'm trying to get a .sh file to run at boot, so I can just plug the Pi in and it runs the script, but how do I do that.
systemctl is what you're looking for. You'll need to install the script somewhere appropriate. Then, create a service file. Make sure that the file is executable (
chmod +x /your/file.sh).
More details can be found here: How do I run a single command at startup using systemd?
In most cases, you edit
$ sudo nano /boot/config.txt and add what you need to start on boot, here is another way in more detailed explanation, copy and paste to new browser tab.