How to Use the DIR Command in Windows



Understanding Boot Order and Why It Matters

The boot order, also referred to as boot sequence or boot priority, determines which storage device your computer checks first when starting up. This fundamental system configuration controls whether your computer boots from the hard drive, solid-state drive, USB flash drive, CD/DVD drive, or network. Understanding how to modify this setting is essential for installing operating systems, running diagnostic tools, recovering data, or simply troubleshooting startup problems.

When you power on your computer, the BIOS (Basic Input/Output System) or UEFI (Unified Extensible Firmware Interface) firmware initiates a Power-On Self-Test and then searches for bootable devices in the order you’ve specified. If the first device in the sequence doesn’t contain a bootable operating system, the firmware moves to the next device in line. This process continues until it finds a valid boot device or exhausts all options.

Modern computers have largely transitioned from traditional BIOS to UEFI firmware, which offers enhanced features including support for drives larger than 2.1TB, faster boot times, and improved security features like Secure Boot. However, the fundamental process of changing boot order remains similar across both systems, though the interface and specific steps may vary depending on your computer manufacturer and model.

When You Need to Change Your Boot Order

There are several common scenarios where modifying your boot sequence becomes necessary. If you’re installing a fresh operating system from a USB drive or DVD, you’ll need to prioritize that installation media over your existing hard drive. When your computer fails to start normally, booting from a recovery drive or live USB can help you diagnose and fix problems. IT professionals and system administrators frequently adjust boot order when deploying operating systems across multiple machines or when working with virtual machines and dual-boot configurations.

Additionally, changing boot priority is crucial when you’ve added a new hard drive or SSD and want to make it your primary boot device. Security-conscious users might also need to access BIOS settings to enable or disable features like Secure Boot, which affects how the system validates boot files. Understanding this process empowers you to take full control of your computer’s startup behavior rather than being limited to default settings.

Accessing BIOS or UEFI Firmware Settings

Before you can change the boot order, you must first access your computer’s BIOS or UEFI firmware interface. This requires pressing a specific key during the initial startup phase, before your operating system begins loading. The challenge lies in timing—you typically have only a few seconds to press the correct key as your computer completes its Power-On Self-Test.

Common BIOS Access Keys by Manufacturer

Different computer manufacturers use different keys to access firmware settings. Knowing the correct key for your specific brand can save considerable frustration:

  • Dell Computers: Press the F2 key repeatedly as soon as you see the Dell logo appear on screen. Some older Dell models may use Ctrl+Alt+Enter or the Delete key instead. Dell also provides quick access to the boot menu by pressing F12, which allows you to select a boot device for a single startup without permanently changing the boot order.
  • HP (Hewlett-Packard) Systems: Most HP computers use the F10 key to enter BIOS setup. Alternatively, press the Esc key immediately after powering on to access the Startup Menu, from which you can select F10 for BIOS Setup. Some HP Tablet PCs may use F10 or F12. Older models might require the F1, F2, or Esc keys.
  • Lenovo Computers: Desktop models typically use F1 to access BIOS, while Lenovo laptops, including the ThinkPad, IdeaPad, and ThinkCentre series, generally use F2. Some Lenovo systems may require pressing the Novo button, a small dedicated button often located near the power button or on the side of the device.
  • ASUS Laptops and Desktops: Press the F2 or Delete key repeatedly during startup. ASUS motherboards in custom-built PCs almost exclusively use the Delete key, while ASUS-branded laptops more commonly use F2.
  • Acer Computers: The F2 key is standard across most Acer models, including the Aspire, Predator, and TravelMate series. For quick boot device selection without entering BIOS, press F12.
  • MSI Systems: Press the Delete key to enter BIOS setup on MSI motherboards and computers. Press F11 to access the Boot Menu directly for one-time boot device selection.
  • Gigabyte Motherboards: Use the Delete key when the Gigabyte logo appears during startup. Some newer models may also accept F2 as an alternative.
  • Samsung Laptops: Press F2 immediately after powering on the device. Samsung computers generally follow standard conventions for firmware access.
  • Toshiba Systems: Most Toshiba laptops use F2, though some older models may require the Esc key. Press the appropriate key as soon as the Toshiba logo appears.
  • Sony VAIO Computers: Press F2 when you see the VAIO logo during startup. Some older VAIO models might use F1 or F3 instead.

Alternative Method: Accessing UEFI Through Windows Settings

If your computer boots too quickly for you to press the BIOS key in time, or if you’re using a modern UEFI-based system, Windows 10 and Windows 11 provide an alternative method to access firmware settings directly from the operating system. This approach is particularly useful for ultrabooks and systems with fast SSDs where the traditional keystroke method proves difficult.

To access UEFI firmware settings through Windows 10 or Windows 11, open the Settings app by pressing Windows key plus I. Navigate to Update and Security, then select Recovery from the left sidebar. Under the Advanced Startup section, click the Restart Now button. Your computer will restart and display a blue Choose an Option screen. Select Troubleshoot, then click Advanced Options. From the advanced options menu, select UEFI Firmware Settings and click Restart. Your computer will reboot directly into the BIOS or UEFI interface, bypassing the need to press any keys during startup.

This method works reliably across all modern Windows systems and is especially helpful when dealing with systems that have disabled or limited the traditional BIOS access keys. It’s also useful in corporate environments where certain firmware access methods may be restricted for security purposes.

Step-by-Step Guide: Changing Boot Order in BIOS

Once you’ve successfully entered your computer’s BIOS or UEFI firmware interface, you can proceed to modify the boot sequence. While the exact appearance and organization of BIOS menus vary by manufacturer, the fundamental process remains consistent across most systems.

Navigating Traditional BIOS Interfaces

Traditional BIOS interfaces typically feature text-based menus with blue, gray, or black backgrounds. You’ll navigate these menus using your keyboard’s arrow keys, as mouse support is usually unavailable in legacy BIOS environments. Look for the Boot, Boot Options, Boot Settings, or Boot Sequence menu—this is where boot priority settings are located.

Once you’ve located the boot menu, you’ll see a list of all bootable devices detected by your system. These might include your hard drives, SSDs, optical drives, USB ports, and network boot options. The device at the top of the list has the highest priority and will be checked first during startup. To change the order, select a device using the arrow keys, then use the designated keys to move it up or down in the priority list. Common key assignments include the plus and minus keys, F5 and F6, or Page Up and Page Down, though your specific system will display the correct keys on screen.

For example, if you want to boot from a USB drive to install a new operating system, you would select the USB device entry and move it to the top position. If you’re setting up a dual-boot system where Windows is installed on your SSD and Linux on a secondary hard drive, you would arrange the SSD at the top of the boot order to ensure Windows loads by default.

Configuring Boot Priority in UEFI Firmware

Modern UEFI interfaces offer graphical environments that often support mouse navigation, making them more intuitive than traditional BIOS. However, the increased sophistication also means more configuration options to navigate. In UEFI systems, boot order settings are commonly found under Boot, Boot Configuration, Boot Manager, or UEFI Boot Settings menus.

UEFI systems distinguish between UEFI boot entries and legacy boot entries. When viewing boot options, you may see entries labeled with UEFI prefixes, such as UEFI: Samsung SSD or UEFI: USB Drive. These entries use the modern UEFI boot method, which is required for drives formatted with the GPT partition scheme and operating systems installed in UEFI mode. Legacy or CSM entries boot in traditional BIOS compatibility mode, necessary for older operating systems or drives using the MBR partition scheme.

To modify UEFI boot order, navigate to the boot settings section and locate the boot priority or boot sequence list. Most UEFI interfaces allow you to drag and drop boot entries using your mouse, or you can select an entry and use the designated keys to reorder items. Some systems provide separate lists for UEFI boot order and legacy boot order—ensure you’re modifying the correct list based on how your operating system is installed.

In UEFI systems, you’ll often encounter additional boot-related settings beyond simple device priority. The Fixed Boot Order section defines the general category priority, such as whether to check hard drives before removable media. The Boot Device Priority subsection within each category then determines which specific device takes precedence. For instance, under Hard Drive Boot Priority, you would select which of multiple installed hard drives or SSDs should be the primary boot device.

Understanding Boot Device Priority Options

When configuring boot order, you’ll encounter various device types and terminology that may initially seem confusing. Understanding what each option represents helps you make informed decisions about your boot configuration.

Common Boot Device Types

  • Hard Disk Drive or UEFI Hard Disk: This represents your internal hard drives and solid-state drives where operating systems are typically installed. In systems with multiple storage drives, you may see individual drive listings by manufacturer and model name, such as Samsung 970 EVO or Western Digital Blue. The Windows Boot Manager entry appears under this category in UEFI systems and represents the Windows bootloader.
  • Removable Devices or USB Storage: This category includes USB flash drives, external hard drives, and other portable storage devices. In UEFI mode, these appear as UEFI: USB Hard Disk or with specific brand names like UEFI: SanDisk Cruzer. Selecting this option allows you to boot from installation media, recovery drives, or portable operating systems.
  • CD/DVD ROM Drive or Optical Drive: Optical drives for booting from CDs or DVDs, though less common in modern systems as many computers no longer include optical drives. This option was historically important for operating system installations but has largely been replaced by USB-based installation methods.
  • Network Boot or PXE: This enables booting from a network server rather than local storage, commonly used in corporate environments for deploying operating systems remotely or running diskless workstations. The Preboot Execution Environment requires specific network infrastructure and is typically disabled in consumer systems.
  • UEFI Boot Manager or OS Boot Manager: This specialized entry manages boot options for systems with multiple operating systems installed. It provides a menu during startup allowing you to select which OS to load, essential for dual-boot and multi-boot configurations.

When you see multiple entries for the same physical device, this typically indicates different boot modes or partitions. For example, a USB drive might appear as both USB HDD and UEFI: USB HDD—the first boots in legacy BIOS mode while the second uses UEFI. Selecting the appropriate entry depends on how your installation media or operating system was prepared.

Saving Changes and Exiting BIOS

After modifying your boot order, you must save the changes before exiting the firmware interface. Failing to save means your adjustments will be discarded and the system will revert to its previous configuration. The save and exit process varies slightly between different BIOS implementations, but the concept remains consistent.

Most BIOS interfaces provide a dedicated Exit menu where you’ll find options to save and exit, exit without saving, or load default settings. The most common method is to press F10, which typically triggers a save and exit prompt in most BIOS versions. A confirmation dialog will appear asking whether you want to save changes and exit—select Yes or confirm with the Enter key. Alternatively, navigate to the Exit menu using the arrow keys and select Save Changes and Exit or a similarly named option.

Some UEFI interfaces feature prominent Save and Exit buttons that you can click with your mouse. Others may require pressing a specific function key while in the boot order menu. Pay attention to the key legend displayed at the bottom or side of the screen, as it indicates which keys perform specific actions in your particular BIOS version.

After confirming the save operation, your computer will restart and apply the new boot order. If you configured the system to boot from a USB drive or DVD, ensure that the appropriate media is connected or inserted before the system restarts. If no bootable media is found on the prioritized device, the system will automatically move to the next device in the boot sequence.

Advanced Boot Configuration Options

Beyond simple boot order changes, BIOS and UEFI interfaces offer several advanced settings that affect how your system boots and what boot options are available. Understanding these settings allows for more precise control over your system’s startup behavior.

Secure Boot Configuration

Secure Boot is a UEFI security feature that helps prevent unauthorized operating systems and malware from loading during the boot process. When enabled, Secure Boot verifies the digital signature of boot files, ensuring they haven’t been tampered with and are from trusted sources. While this enhances security for Windows installations, it can prevent some Linux distributions and older operating systems from booting if they lack proper signing keys.

To disable Secure Boot, navigate to the Security or Boot Security section of your UEFI settings. Find the Secure Boot option and change it from Enabled to Disabled. Some systems require you to set a supervisor password before allowing Secure Boot modifications. After disabling Secure Boot, save your changes and exit. Note that disabling this feature reduces your system’s security posture, so only do so when necessary for compatibility reasons.

Fast Boot and Ultra Fast Boot

Fast Boot is a feature that reduces startup time by skipping certain hardware checks during the Power-On Self-Test and initializing only essential components. While this speeds up the boot process, it also shortens the window for pressing BIOS access keys and may prevent booting from external devices until the feature is disabled. Ultra Fast Boot, available on some systems, further accelerates startup but makes BIOS access nearly impossible without using the Windows Advanced Startup method.

If you’re planning to boot from USB drives or access BIOS frequently, consider disabling or setting Fast Boot to a lower setting. This provides more time to press the appropriate key during startup and ensures all boot devices are properly initialized and detected.

CSM (Compatibility Support Module) Settings

The Compatibility Support Module allows UEFI firmware to boot operating systems and devices that were designed for legacy BIOS systems. When CSM is enabled, your system can boot in either UEFI mode or legacy BIOS mode, providing backward compatibility with older operating systems and hardware. Modern Windows installations on GPT-formatted drives require UEFI mode without CSM, while older operating systems on MBR-formatted drives may require CSM or legacy boot mode.

To modify CSM settings, look for Boot Mode, CSM Configuration, or Legacy Support options in your firmware settings. Options typically include UEFI Only, Legacy Only, or UEFI with CSM/Legacy. Select the appropriate mode based on your operating system requirements and drive partition scheme.

Changing Boot Order From Within Windows

Advanced users working with UEFI systems can modify boot order without entering the BIOS interface by using command-line tools built into Windows. This method requires administrative privileges and a solid understanding of command syntax, as incorrect commands can affect system bootability.

Using BCDEdit to Modify UEFI Boot Order

The BCDEdit tool, included with Windows, allows you to view and modify Boot Configuration Data, including UEFI firmware boot entries. To access BCDEdit, open Command Prompt as Administrator by searching for cmd in the Start menu, right-clicking on Command Prompt, and selecting Run as Administrator.

To view the current UEFI boot order and available firmware applications, enter the command: bcdedit /enum {fwbootmgr}

This displays the firmware boot manager entries and their current display order. Each entry is identified by a unique GUID enclosed in curly braces. The displayorder line shows the sequence in which boot options appear and are prioritized.

To change the boot order, use the command: bcdedit /set {fwbootmgr} displayorder {GUID1} {GUID2} {bootmgr}

Replace GUID1 and GUID2 with the actual GUIDs from your system’s boot entries, arranging them in your preferred order. The bootmgr entry typically represents the Windows Boot Manager and should generally be included in the sequence.

After executing the command, restart your computer for the changes to take effect. Note that this method only works reliably on true UEFI systems and may not function on systems with CSM enabled or on certain manufacturer-specific firmware implementations, particularly some HP models that override command-line boot order changes with their own firmware settings.

Troubleshooting Common Boot Order Issues

Even when following the correct procedures, you may encounter problems when changing boot order or booting from alternative devices. Understanding common issues and their solutions helps you resolve boot-related problems quickly.

Boot Device Not Appearing in BIOS

If a USB drive, DVD, or other boot device doesn’t appear in your BIOS boot menu, several factors could be responsible. First, ensure the device is properly connected before entering BIOS—many systems scan for boot devices during the initial Power-On Self-Test and won’t detect devices connected afterward. Try connecting the device to a different USB port, preferably a USB 2.0 port rather than USB 3.0, as some older BIOS versions have limited USB 3.0 support.

Verify that your boot media is properly formatted and contains valid boot files. USB drives should typically be formatted as FAT32 for UEFI systems or NTFS for legacy systems. Installation media must be correctly created using tools like Rufus, Media Creation Tool, or dd commands, as simply copying files to a drive doesn’t make it bootable.

Check whether your USB support settings are enabled in BIOS. Look for USB Configuration, USB Legacy Support, or USB Boot options and ensure they’re enabled. Some systems separate USB support into categories like USB Keyboard Support and USB Storage Support—both may need to be enabled for bootable USB devices to function.

System Still Boots to Old Operating System

If you’ve changed the boot order but your system continues booting to the previously installed operating system, verify that you saved your BIOS changes before exiting. It’s surprisingly easy to exit without saving, especially when unfamiliar with a particular BIOS interface. Re-enter BIOS and confirm your boot order changes are still present.

In systems with multiple hard drives, ensure you’ve modified both the general boot device category priority and the specific device priority within that category. Some BIOS implementations require you to set your preferred hard drive as the first device in the Hard Drive Priority or Hard Disk Boot Order submenu, in addition to selecting Hard Drive as the primary boot device category.

For UEFI systems, check whether you’re booting the device in the correct mode. If your installation is UEFI-based but you’re prioritizing a legacy boot entry, or vice versa, the system won’t boot to the intended device. Ensure the boot entry you’ve prioritized matches the boot mode of your operating system installation.

Boot Configuration Changes Won’t Save

On some systems, particularly certain HP laptop models, firmware boot order changes made through operating system tools or even within BIOS may not persist after restart. This occurs because the manufacturer’s firmware includes additional management layers that override user-specified boot configurations. For these systems, you must access a specialized boot manager menu, typically found under OS Boot Manager or Boot Option Manager within the BIOS, where you can arrange boot entries using F5 and F6 keys. These manufacturer-specific menus provide the only reliable method to change boot priority on affected systems.

If a supervisor or administrator password is set in BIOS, you may be restricted from changing boot options until you provide the password. Navigate to the Security section to enter the password, or clear the existing password if you have authorization to do so.

Pro Tips for Boot Order Management

Implementing these expert recommendations will help you manage boot configurations more effectively and avoid common pitfalls that can complicate system startup.

  • Document Your Default Boot Order: Before making changes, take a photo of your current boot order screen or write down the existing sequence. This documentation proves invaluable if you need to restore original settings, especially in systems with numerous boot entries where the correct order may not be obvious.
  • Use One-Time Boot Menu Instead of Permanent Changes: Most systems provide a quick boot menu accessible by pressing F12, F11, F9, or another manufacturer-specific key during startup. This menu allows you to select a boot device for a single restart without permanently changing the boot order. Use this feature when you only need to boot from installation media or a recovery drive once, as it’s faster than entering BIOS and safer than making unnecessary permanent changes.
  • Match Boot Mode to Drive Partition Scheme: Ensure your boot mode matches your drive’s partition table format. UEFI mode requires drives formatted with GPT partitioning, while legacy BIOS mode requires MBR partitioning. Mismatches between boot mode and partition scheme will prevent your system from booting even if the boot order is correct. You can check a drive’s partition scheme in Windows Disk Management or using the command diskpart followed by list disk—GPT disks show an asterisk in the GPT column.
  • Disable Unnecessary Boot Devices: Rather than simply lowering their priority, consider disabling boot options you never use, such as network boot or floppy disk emulation. This streamlines the boot process and reduces the time your system spends checking unused devices during startup. Most BIOS implementations allow you to disable specific boot device categories entirely.
  • Keep BIOS Updated: Manufacturers periodically release BIOS and UEFI firmware updates that improve boot device detection, fix bugs, and enhance compatibility with newer hardware. Check your computer manufacturer’s support website regularly for firmware updates, and follow their instructions carefully when applying updates. Never interrupt a BIOS update in progress, as this can render your motherboard unusable.
  • Create Multiple Boot Profiles: Some advanced UEFI implementations allow saving multiple boot configurations as profiles that you can quickly switch between. If your system supports this feature, create separate profiles for different use cases, such as normal operation, USB booting, or network deployment scenarios.
  • Test Boot Changes Immediately: After modifying boot order, restart your system immediately to verify the changes work as intended. Don’t save additional configuration changes until you’ve confirmed your boot order modification is functioning correctly. This practice makes troubleshooting easier if something goes wrong, as you’ll know exactly which change caused any issues.
  • Be Cautious With Secure Boot Changes: Only disable Secure Boot when absolutely necessary for compatibility reasons. Some Linux distributions and dual-boot scenarios require it to be disabled, but for Windows-only systems, keeping Secure Boot enabled provides valuable protection against bootkits and rootkits. If you must disable it temporarily, remember to re-enable it after completing your task.

Frequently Asked Questions

Can I change boot order without restarting my computer?

While you can view and modify UEFI boot entries using command-line tools like BCDEdit in Windows without restarting, the changes won’t take effect until you reboot your system. Additionally, some manufacturers’ firmware implementations override command-line changes, making the BIOS interface the only reliable method for permanent boot order modifications. The Windows Advanced Startup method requires a restart to access UEFI settings but doesn’t require timing a keypress during POST.

Why can’t I see my USB drive in the BIOS boot menu?

USB drives fail to appear in BIOS for several reasons. The drive must be connected before entering BIOS, as most systems scan for boot devices during initial POST. Ensure USB Legacy Support or USB Boot Support is enabled in your BIOS settings. Verify your USB drive is properly formatted and contains valid boot files—simply copying an ISO file to a USB drive doesn’t make it bootable. Try different USB ports, particularly USB 2.0 ports, as some older BIOS versions have limited USB 3.0 support. Finally, ensure the boot mode matches your media preparation—UEFI boot media won’t appear in legacy boot device lists and vice versa.

What’s the difference between boot order and boot priority?

Boot order and boot priority are two terms for the same concept—the sequence in which your computer checks storage devices for bootable operating systems. Some manufacturers use boot sequence, boot priority, or boot device order, but all refer to the ranked list of devices your firmware examines during startup. The device at the top of the list receives the highest priority and is checked first.

Will changing boot order delete my data?

No, modifying boot order is a firmware configuration change that doesn’t affect data stored on your drives. Boot order only determines which device your computer checks first when starting up—it doesn’t format drives, delete files, or modify partitions. However, if you boot from installation media and proceed with an operating system installation, that process may delete or overwrite data depending on the installation options you select. Always back up important data before installing operating systems or running disk management tools.

How do I restore default boot settings?

Most BIOS implementations include a Load Setup Defaults, Load Optimized Defaults, or Reset to Default option in the Exit menu or within a dedicated menu section. Selecting this option restores all BIOS settings, including boot order, to the manufacturer’s default configuration. Note that this affects all BIOS settings, not just boot order, so any custom configurations for memory timings, fan curves, or other parameters will also revert to defaults. After loading defaults, you’ll need to save changes and exit for the reset to take effect.

Can I boot from a second hard drive without changing BIOS settings?

Yes, most systems provide a one-time boot menu accessible by pressing F12, F11, F8, or another manufacturer-specific key during startup. This temporary boot menu displays all detected bootable devices and allows you to select which device to boot from for that single restart without permanently modifying your boot order in BIOS. This method is ideal when you occasionally need to boot from a secondary drive, USB device, or optical disc without making permanent configuration changes.

Why does my system boot to Windows even after I changed boot order to prioritize my Linux installation?

This commonly occurs in dual-boot configurations when Windows Boot Manager takes precedence over other boot entries in UEFI systems. Navigate to your UEFI boot settings and look for a submenu called OS Boot Manager, Boot Option Manager, or UEFI Boot Order. Within this submenu, you should see individual entries for both Windows Boot Manager and your Linux bootloader. Use the arrow keys or drag-and-drop functionality to move the Linux entry above Windows Boot Manager. Some systems require you to prioritize the device category generally and then set the specific boot manager order separately.

Is it safe to enable Legacy Boot or CSM on a UEFI system?

Enabling Legacy Boot or CSM is generally safe but comes with trade-offs. It allows booting older operating systems and hardware designed for traditional BIOS, but disables certain UEFI-exclusive features including Secure Boot. Modern Windows installations on GPT-partitioned drives won’t boot in legacy mode, so enabling CSM is typically only necessary when dual-booting with older operating systems, running specific diagnostic tools that require legacy support, or working with specialized hardware that lacks UEFI drivers. For contemporary systems running modern operating systems, keeping legacy support disabled and using UEFI-native boot provides better security and functionality.

Conclusion

Understanding how to access and modify your computer’s boot order is an essential skill that empowers you to install operating systems, troubleshoot startup problems, and configure dual-boot systems with confidence. While the specific keys and menu layouts vary by manufacturer, the underlying concepts remain consistent across all systems—firmware checks devices in the priority order you specify until it finds a bootable operating system.

Modern UEFI systems offer enhanced capabilities compared to legacy BIOS, including graphical interfaces, mouse support, and advanced security features like Secure Boot. However, these improvements come with increased complexity, particularly when managing boot modes, partition schemes, and compatibility settings. Taking time to understand the relationship between boot modes, drive formats, and operating system requirements helps avoid common pitfalls that can prevent systems from starting properly.

Whether you’re a casual user installing an operating system for the first time or an experienced professional managing multiple boot configurations, the methods and troubleshooting approaches covered in this guide provide a comprehensive foundation for boot order management. Remember to document your default settings before making changes, use one-time boot menus when permanent modifications aren’t necessary, and always verify that your boot mode matches your drive’s partition scheme.

By mastering these fundamentals and following the best practices outlined throughout this guide, you’ll be equipped to handle virtually any boot configuration scenario you encounter. The ability to confidently access firmware settings and modify boot priority transforms intimidating system administration tasks into straightforward procedures, giving you complete control over how your computer starts and which operating systems it loads.