I have an Ubuntu 20.04 VM. I connect to it via SSH and run ./script.sh. It runs for as long as I am connected to the VM, but the moment I disconnect, it stops running.
I understand that I can use crontab, but as per my understanding, it will run ./script.sh every minute, instead of running ./script.sh once and then letting it run.
I wish to make it run forever. How can I do this? Will I have to make it a service?
Thank you.