You are trying to boot from the flash drive after you have installed Ubuntu. Instead, you need to boot to GRUB installed on your internal drive. This can be done by pressing the esc key once immediately after selecting Ubuntu from the Start Menu. (I assume here you installed for a UEFI boot.) It took me a couple tries before getting the hang of it. Once ...
You can do a clean install of Ubuntu on a Mac without needing to install rEFInd.
The procedure for installing depends on the model Mac and the version of Ubuntu.
The rEFInd boot manager can be useful in the following situations.
You want a menu with operating system choices to appear each time the computer boots or reboots.
You want to select the default ...
It's quite straightforward, but when playing with partitions and dual boot systems, things can go wrong so:
First use CarbonCopyCloner to make a clone of your Mac in case anything goes awry.
Next, reboot the mac and hold down Command-R as it's restarting (when you here the gong usually) to boot into recovery mode.
Once recovery mode boots up, select Disk ...
For only iTerm2 users
You just need to add a key binding in Preferences. Preferences -> Keys -> Key Bindings. Add a new keybinding, choose your keyboard shortcut and choose action as Send Hex Code. For example I configured ⌘Y to Ctl-C (interrupt).
Follow this link to find hex codes for Ascii control codes (control characters, C0 controls).
Enter the following command. This will change the MacOS Catalina partition back to an APFS container.
sudo sgdisk -t 2:7C3457EF-0000-11AA-AA11-00306543ECAC /dev/sda
Next, you will need to reboot. Immediately after rebooting, hold down the option key until the Startup Manager appears. Hold down the control key before selecting macOS from the Startup Manager ...
"Terminal"-apps on macOS (I put that in quotes because technically they haven't got anything to do with Terminal.app, but merely being command line programs) are not in general identical to macOS apps. However most are very similar.
This stems from the fact that macOS can trace many of its standard command line tools to FreeBSD whereas Linux inherits them ...