Baeldung Pro – Linux – NPI EA (cat = Baeldung on Linux)
announcement - icon

Learn through the super-clean Baeldung Pro experience:

>> Membership and Baeldung Pro.

No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.

1. Introduction

Dual-booting Windows and Ubuntu refers to installing both operating systems on a single computer, allowing users to choose which one to use at startup. This setup is especially useful for individuals who want to utilize the unique benefits of each system.

Moreover, dual-booting provides full hardware access to each OS, which ensures better performance compared to using virtual machines. Since only one operating system runs at a time, users can enjoy a smoother and faster experience.

In this tutorial, we’ll walk through the process of setting up a dual-boot system with Windows and Linux.

We’ll begin by downloading Ubuntu, followed by using Rufus to create a bootable USB drive. Next, we’ll configure Secure Boot settings to enable dual operating system support on our PC. After that, we’ll proceed to install Linux alongside Windows. Finally, we’ll walk through how to choose between Windows and Ubuntu from the boot menu after installation.

2. Preparing for Installation

Initially, we need to ensure that Windows 10 or 11 is already pre-installed on our computer. Additionally, it’s important to confirm that the SSD or HDD has enough free space for the necessary installations.

Once we have properly set up Windows. Next, we should download the Ubuntu operating system or any other preferred Linux distribution onto our computer. Moreover, we can obtain Ubuntu from its official Ubuntu website:

Ubuntu_website

After downloading Ubuntu, we’ll create a bootable USB. To create one, we need to download software that facilitates this process.

2.1. Rufus Setup

For this purpose, we’ll use Rufus, which can be downloaded from its official website. Once launched,  we should see an interface similar to the one shown below:

Rufus_website

Next, we’ll scroll down the page until we can locate the download section for Rufus. From the list of available versions, we choose the first Standard edition to proceed with the download:

Rufus_download_section

Upon selection, the download will begin automatically. After completion, we install and launch Rufus. Upon opening the application, we’ll see an interface like this:

Rufus_application

Furthermore, we need to navigate to the Device section and select our USB drive. Before continuing, we should make sure the USB doesn’t contain any important data, as it’ll be formatted during the process. Also, we should ensure the drive has at least 8 GB of storage to support the operating system.

After selecting the USB, we move to the Boot Selection section and choose the Ubuntu ISO file. Once everything is set, we click the Start button. Rufus will begin by formatting the USB and then proceed to create a bootable Ubuntu operating system on it.

Now, to install Linux on our computer, we first need to create some free space for the installation.

2.2. Creating Volume

To do this, we’ll use the Disk Management tool. First, we right-click on the Windows Start button, and a menu with several options will appear. From there, we click on Disk Management to open it:

Disk_management_loaction

Once opened, an interface will appear showing a list of the available storage devices:

Available_storage_devices

To create space for Ubuntu, we partition the storage area where Windows is installed, typically the C drive. So, we right-click on the C drive, then select Shrink Volume to reduce its size and free up space for the Ubuntu installation:

Shrink_Volume

Once we click Shrink Volume, a pop-up window will appear where we can specify the amount of space to allocate for Ubuntu. Typically, 25 GB is recommended, but we can adjust this based on our storage needs:

Creating_space

After selecting the amount of space, we click the Shrink button. Subsequently, the system will allocate the specified amount of space as unallocated storage. Thus, we’ll use this unallocated space for the Ubuntu installation:

Space_created

At this point, the system creates the partition but leaves it unformatted and unassigned. Therefore, this makes the partition ready for Ubuntu or any other Linux distribution to use during installation.

Next, we check if Secure Boot is disabled on our system, as it plays a crucial role in setting up dual-boot. To do this, we check the System Information window in Windows.

3. Secure Boot

First, we go to the Windows search bar and type System Information. Once it appears in the search results, we click on it to open the System Information window:

System Information

After selecting System Information, a list of items and their corresponding values will appear. Here, we locate the Secure Boot option to determine whether it’s enabled or disabled:

System Information Options

Next, if Secure Boot is enabled, we need to disable it. To do so, we go to the Start menu, select Power options, and click on Restart to reboot the system. During the restart, we hold down the ESC key to access the System options menu:

Options Menu

Subsequently, in the System options menu, we select Troubleshoot and then Advanced options:

Troubleshoot

After selecting Advanced options, we choose the UEFI Firmware Settings option:

Advance Options

Moreover, when prompted, we must select Restart to enter the UEFI/BIOS settings:

UEFI Settings

Furthermore, within the BIOS menu, we navigate to the Boot section. Then, we use the arrow keys to navigate since the mouse doesn’t work in the BIOS. We select Secure Boot:

Boot Menu

From here, we can either enable or disable Secure Boot. In this case, we choose Disabled:

Secure boot options

After selecting the Disabled option, Secure Boot will be turned off. Now, we’ll save the changes we made in the BIOS:

Secure boot disabled

To do so, we’ll switch between the tabs until we reach the Exit option in the menu. In the Exit menu, we’ll select the Save Changes & Reset option:

Saving changes

Consequently, we’ll click on the option and then select Yes to confirm the changes we previously made in the BIOS.

4. Installing Linux

We are now ready to install Ubuntu. First, we insert the USB drive containing the Ubuntu installation files into the computer. Additionally, we restart the system while holding the ESC key to access the boot options:

Options Menu

This will bring us to the Systems options menu. From here, we select the Use a device option:

Selecting USB

In the next window, we choose the USB drive containing the Ubuntu OS, and Ubuntu will begin to boot:

Installing Ubuntu

 

Once Ubuntu loads, we’ll be presented with options. We select Try or Install Ubuntu to begin the installation process. After Ubuntu finishes booting, a graphical interface will appear to guide us through the steps:

Ubuntu_Installation_Network

Then, we click Next and choose Minimal installation to speed up the setup process. While the full installation is also available, it takes considerably more time than the minimal option:

Ubuntu_installation_app_updates

After that, we select Install Ubuntu. It’ll help us boot Windows along with the Ubuntu operating system:

Installation_Boot_manager

Now, once we click the Next button, we’ll see a summary of the devices. Then, we click the Install button to start the installation:

Device_partition

Subsequently, the system will prompt us to select our timezone:

Ubuntu install 07

After choosing the timezone, the next step is to set up the credentials for the operating system:

Setting_Credentials

Then, the system will give us the option to choose between a Light or Dark theme.

Once we complete all these steps, we’ve successfully installed Ubuntu:

Ubuntu_installed

Finally, we select Restart now and unplug the USB from our PC.

Once the computer restarts, it’ll boot into the Windows operating system. To select a different operating system to boot from, we restart the computer again and hold the ESC key to enter the System options menu.

5. Boot Menu

After accessing the System Options menu, we select UEFI Firmware Settings and click on Restart. This will take us to the BIOS menu, where we’ll again navigate to the Boot section:

Boot Menu

There, we navigate to the boot options and move the Ubuntu operating system to the top of the boot priority list:

OS_Boot_Options

Afterwards, we exit the BIOS by selecting Save Changes & Reset:

OS_booting_menu

Upon restart, the Linux boot menu will appear, allowing us to select the operating system. We can then choose Ubuntu to boot into our newly installed operating system:

Ubuntu_running

Ubuntu will boot, and its graphical user interface will appear.

6. Conclusion

In this article, we walked through the steps to set up a dual-boot system with Windows and Linux.

We started by downloading Ubuntu and then used Rufus to create a bootable USB drive. Afterwards, we adjusted the Secure Boot settings to allow the system to support both operating systems. We then installed Linux alongside the existing Windows installation. Lastly, we demonstrated how to select either Windows or Ubuntu from the boot menu during startup.