I want to have a linux OS and a Windows 10 OS on the same computer. Is there a way were it's like when I turn on the computer I get an option for choosing which OS I want to boot up? I want to use Ubuntu for programming and Windows 10 for gaming since I've heard that a lot of games mainly work on Windows operating systems. What are the benefits for having multiple OS? Is there a better set up for having more than one operating system? Linux seems pretty interesting to me and I just want to mess with it more.
Yes, of course you can have 2 or even more operating systems installed on the same computer. It's called dual-boot, see this article for example.
Apart from installing additional operating systems you can consider running them in a virtual machine - it should be much easier to do than dual-boot but it takes more RAM as you'd run more than one operating system at the same time. Virtualbox is a popular, free and stable software for running virtual machines and it works on Linux and Windows.
You can do what's referred to as "Dual-Booting" which is to install multiple operating systems on your computer as you see fit. Another option (if you're just wanting to test Linux out, as you said) is using a Linux Live USB/CD/DVD.
There's also the option of Windows Subsystem for Linux which can give you a copy of Ubuntu virtualized in your Windows 10 installation.
Also virtual box or other virtualisation software.Windows subsystem for linux, is a poor replacement for Gnu/Linux. Many incompatibilities. Some have said that it is a plot by Microsoft to discredit Gnu/Linux
I've found the only thing I dislike about running Ubuntu in a VM is speed. I wouldn't suggest using it that way for very long, and remember that it'll be faster when it's the only OS running (even if just from a Live USB!).
It seems that running Linux in a VM is more practical than putting a Windows operating system in a VM if the main motivation is to "mess with Linux more". In fact, you may find this question on superuser helpful, but do be very careful to vet any site before running a pre-built VM - there is a chance of someone nefariously loading malware to a VM and putting it out somewhere for people to download and use.
As far as dual-booting goes, Ron's alternative suggestion is great from the standpoint that there may be fewer technical challenges and fewer opportunities for one OS [ahem, Windows] or Virtual Machine platform to make your life difficult.
While this author uses VMs extensively for a variety of purposes, some use of VMs for gaming can prove disappointing.
- Using the virtual machine path for gaming (Windows) may require some investigation with respect to use of high performance graphics hardware. It is not necessarily straightforward to assure optimal accelerated graphics performance in a VM. This could influence whether the VM is for the gaming OS or for the other OS.
- Using a virtual machine for disk intensive operations may produce disappointing results on some hardware. Whether this influences use of a VM for one or the other desired operating systems depends on hardware performance and the application.
- If something does not work, a VM can add complexity or barriers with respect to sharing hardware between operating systems, use of special hardware (controllers, etc.). This isn't to say that problems will be experienced as VM platforms are constantly improving, but if trouble crops up, issues may be harder to diagnose and resolve in a VM.
VMs are nice with sufficiently performing systems to run them on, but not everyone has high-performance hardware. Furthermore, if the games to be played are not extremely demanding relative to hardware, the caveats may not apply.
Searching the internet for "bare metal versus virtual machine" could provide some additional insight.
While this question is about operating systems, since gaming has been brought up, if one develops a strong preference for Linux, it may be worth pointing out that Steam, Good Old Games (GOG), and possibly other well-known vendors, have Windows games that they support on Linux. There are also platforms like Lutris, PlayOnLinux, (and Wine) that facilitate installing and running Windows software on Linux systems. That said, there are a lot of Windows games that won't run using these platforms, so game choices are limited, but there are resources out there that show which games people have had success with and which ones might be more challenging to get working.
The best option, especially for someone who is getting started and wants to explore, is to use the Windows Subsystem for Linux (WSL). WSL allows you to seamlessly run Linux alongside Windows, and is easy to set up.
WSL operates in two modes:
WSL1 is a subsystem. It is a translation layer in the Windows NT kernel. (It actually operates at the same level as the Win32 subsystem, which basically all native Windows apps use.)
In WSL1, Linux syscalls are translated to native NT kernel calls. Windows itself is able to load and run ELF binaries, and you use a standard Linux userland. This means:
- Linux processes show up in Task Manager alongside Windows processes.
- Networking is implemented by Windows, and Windows and Linux apps share the same networking stack. (ie, a single IP address for both)
- There's zero RAM overhead since Linux processes run directly on the Windows kernel.
- Linux files are stored as normal files (with special metadata) on your NTFS filesystem. Again, this means there's very little space overhead.
WSL2 is a virtual machine (VM). It runs a real Linux kernel in a VM alongside Windows. This means:
- Linux processes do not show up in Task Manager; they are managed by the Linux kernel. (A single entry in Task Manager represents the RAM and CPU usage of everything inside the VM.)
- Networking is implemented by Linux. Linux gets a separate IP address.
- There is non-trivial RAM overhead involved with running a VM, but WSL2 is optimized to be lightweight versus running a full VM yourself. Windows will dynamically grow and shrink the VM's RAM allocation based on actual Linux memory usage. (This is really cool!)
- Linux files are stored in an ext4 hard drive image file (VHD).
Comparing modes, WSL 1 & 2 each have their own pros and cons.
- Con: Windows' Linux syscall implementation is incomplete. Most utilities work fine, but some things are broken. Most notably, Docker does not work.
- Con: NTFS makes different architectural and design decisions as compared to unix filesystems, which result in slower access to lots of small files. This access pattern is uncommon for Windows apps, but is very common on unix. As a consequence, things that read and write lots of files (like
npm, etc) are several times slower than on a native filesystem.
- Pro: Very low overhead (in bytes used) for RAM and HDD.
- Pro: Networking is simpler. Other devices on your LAN can connect to Linux services.
- Con: Since networking is controlled by Windows, things like
- Con: It's a VM, so it has a RAM overhead of several hundred MB
- Pro: Since it's a full, real Linux kernel, it is 100% compatible and everything works exactly the same as a normal Linux installation, including Docker and networking.
- Con: The Linux VM is behind a virtual NAT router. You can connect to Linux services from Windows apps on the same machine, but not from other devices on the LAN (without painful forwarding configuration).
- Pro: Since Linux files are installed on a ext4 virtual disk, filesystem access is noticeably faster.
- Con: You have to deal with the usual limitations of a VHD, like resizing it if you run out of space, and reclaiming freed space for the host system.
Microsoft also supplies additional points of comparison.
The best mode for you will depend on your exact use case and needs. Either way, there are a number of benefits to using WSL:
- Lower overhead compared to running your own VM install, and much less pain than dual booting.
- You can run multiple Linux distributions side-by-side at the same time (in either mode).
- Get tight integration with your Windows environment:
- In Linux, your Windows files automatically appear under
- In Windows, Your Linux files automatically appear under
- In Linux, your Windows files automatically appear under
One thing WSL does not provide is the full Linux GUI experience — you'll need a full VM or dual boot for that. (However, you can run an X server to run individual Linux GUI apps, and native WSL support for GUI apps is coming soon.) That said, the more interesting parts of Linux are generally command line driven anyway.
Yes, this is possible.
If you want to be able to run both operating systems "normally", you would do what's called "dual-booting". In this scenario, you'd have both operating systems installed in different partitions on your hard drive. When you turn on the computer, you must choose one operating system to boot. If you want to switch to the other operating system, you must reboot the computer and choose the other operating system.
Another option you could choose is to run one of the operating systems as a Virtual Machine. This would require the least changes to your existing system. You wouldn't have to change anything related to your hard drive partitions, boot system, or anything outside of your current operating system. You may simply download a Virtual Machine program (Virtualbox is a common free one), configure it, and start it up. You may think of it as a virtual computer, one that runs as a program.
Pros of dual-booting:
- Better performance
- All of your devices will "just work" (they don't have to go through the VM, where strange things may sometimes happen)
- Experience with installing operating systems
Pros of using a Virtual Machine:
- It's safer (you don't have to worry about messing up your hard drive partitions)
- It's easier
- You can run both operating systems simultaneously.
I would recommend using two different disks, or ssd's.
Have Windows installed on one, and linux installed on the other. They will be then be independent of each other, and you will have near zero risk of windows messing up linux or linux windows messing up windows. And that can happen when both are on the same disk where you are then relying on the partitions of a single disk to separate the two operating systems along with having GRUB2 of linux take over and preempt the windows boot loader. Windows10 last I checked does not play nice with linux in the boot manager department.
you can mail order a 120GB SSD for $20
Is there a way were it's like when I turn on the computer I get an option for choosing which OS I want to boot up?
so for this two disk recommendation to work, you have to rely on your motherboard's BIOS/EFI boot menu to select between which disk to boot. This is not dual booting in the traditional sense. You're booting a specific disk. You are then only limited to the physical number of SATA ports your motherboard has... you can usually connect at least 4 [SATA] disks on the cheapest of motherboards today.
My ASROCK mobo at home I set in it's BIOS (EFI) and tell it to show the boot manager: it shows my windows disk or my linux disk, with the windows disk booting by default after a 3 second timeout. My dell junk computer at work, I hit F12 to get into it's boot menu and then manually select either my
linux disk to boot. This should be able to be done on any pc, some graphically nicer than others.
Of course it is possible. People have been dual/triple booting Windows with Linux before the end of 1990s. Nowadays it is more common to use virtual machines. One real operating system that hosts multiple guest operating systems. Popular ones are VirtualBox, Hypervisor which is built-in on Windows 10.