Go to Virtualbox official website and download the virtualbox debian package file.
Change the virtualbox package file permissions:
sudo chmod 755 virtualbox-7.0_7.0.8-156879~Ubuntu~jammy_amd64.deb
Open terminal and use apt
command to install the virtualbox package file with its dependencies.
sudo apt install ./virtualbox-7.0_7.0.8-156879~Ubuntu~jammy_amd64.deb
It will prompt you to create a new MOK, and will guide you through the steps to enroll that key in your system's firmware. This process requires a reboot.
Select Ok and press enter.
![Configuring Secure Boot](/assets/images/secureboot-01.png)
Enter a password for secure boot and remember the password since it will be asked again after a reboot. Then select Ok and press enter.
![Configuring Secure Boot](/assets/images/secureboot-02.png)
Enter the same password again. Then select Ok and press enter.
![Configuring Secure Boot](/assets/images/secureboot-03.png)
At the end of the installation process, apt
displays an error due to installing a downloaded package. You can ignore this error message.
N: Download is performed unsandboxed as root, as file '/home/codingemperor/Downloads/virtualbox-7.0_7.0.8-156879~Ubuntu~jammy_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Now reboot the machine, and you will see the blue screen as below.
![Configuring Secure Boot](/assets/images/shim-01.jpg)
Press any key as suggested, and we will see the next screen. Select Enroll MOK and press enter.
![Configuring Secure Boot](/assets/images/shim-02.jpg)
Select View Key 0 to view the key the and press enter
![Shim UEFI Key Management](/assets/images/shim-03.jpg)
![Shim UEFI Key Management](/assets/images/shim-09.jpg)
Press any key to close. Then select Continue and press enter.
![Shim UEFI Key Management](/assets/images/shim-05.jpg)
Select Yes and press enter.
![Shim UEFI Key Management](/assets/images/shim-06.jpg)
Enter the password which we entered before and press enter.
![Shim UEFI Key Management](/assets/images/shim-07.jpg)
Select Reboot and press enter.
![Shim UEFI Key Management](/assets/images/shim-08.jpg)
After your Ubuntu is rebooted completely, you can launch virtualBox to start using virtual machines on your system.