If you install Ubuntu first and Windows later, you’ll notice that it’s not possible to boot into Linux anymore. As Windows boot loader doesn’t really handle Linux, you’ll need to tell Windows to use Grub.
Once you’re in command prompt with administrative privileges, you can execute:
BCDEDIT /set {bootmgr} path \EFI\Ubuntu\grubx64.efi
After reboot Grub will show it’s ugly face and you’ll have another problem - there are no Windows entries.
To get them into Grub menu, one can simply update grub:
sudo update-grub
On most Linux distributions this will trigger OS Prober and Windows Boot Manager entry will magically appear. However, if you have OS Prober disabled or you want to disable it in future for some reason, you can add manual entry too:
cat << EOF | sudo tee /etc/grub.d/25_windows
#!/bin/sh
exec tail -n +3 \$0
menuentry 'Windows 10' {
savedefault
search --no-floppy --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi
chainloader (\${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
EOF
sudo chmod +x /etc/grub.d/25_windows
sudo update-grub
In either case, boot menu should now offer you option to get into Windows.