48

I would like to install Kali Linux on my computer using dual booting. My computer has 8GB of RAM. Will that RAM be separated into 4GB for Kali Linux OS and 4GB for Windows if I use dual boot?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Dr. vales
  • 659
  • 1
  • 5
  • 6
  • 134
    On a dual boot, **either** Windows **or** Kali are loaded. Never both at one time – Eric F Apr 19 '18 at 16:17
  • 10
    If you want to run two operating systems at once, you need a VM software/suite such as VMWare, QEMU, VirtualBox, Hyper-V, etc. In this case both the host operating system and guest operating system exist in RAM at the same time. The VM suite will have a component called a "hypervisor" that sits between host and guest and arbitrates/emulates I/O. – LawrenceC Apr 19 '18 at 16:22
  • 142
    This is rather a basic question. No shame about it, each of us learnt it at some time in the past, you are learning now; it's perfectly OK. However please read [this about Kali Linux](https://unix.stackexchange.com/a/399627/108618), it *may* save you a lot of frustration. – Kamil Maciorowski Apr 19 '18 at 16:29
  • 31
    As Kamil has stated you may want to read the Kali manual as Kali is not a good flavor of Linux to start with as it requires much more knowledge compared to something like Ubuntu. – Eric F Apr 19 '18 at 17:00
  • 2
    System memory is volatile, which means, once the machine is rebooted the contents are lost. Additionally, unless configured otherwise, Windows and Kali both will access all available system memory (which again would be clear when the system was restarted). – Ramhound Apr 19 '18 at 21:49
  • 5
    Who was telling you that RAM gets split? –  Apr 20 '18 at 07:49
  • 77
    Look, I mean no offense (we've all gotta start *somewhere*), but if you have to ask this question, kali is not for you. Documentation, both official and here at stack exchange, is going to assume you know things you evidently don't know. – Jared Smith Apr 20 '18 at 12:04
  • 9
    If it LOOKS like that because one of the systems only sees 4GB RAM, check if you actually installed a 32bit OS that is either not PAE capable or on non PAE capable hardware. – rackandboneman Apr 20 '18 at 14:23
  • 15
    I don't mean to pile onto the other comments, but I want to explicitly state that there is almost no reason to dual-boot Kali. In fact, there's almost no reason to boot Kali at all, and it should most often be used in a VM. If it is being booted as a host OS, it is likely a machine built specifically for those purposes which Kali is used for. If you are a beginner to Kali, you should absolutely never install it and try to use it for it's intended purposes as a host OS on your own machine. Due to the nature of Kali's purpose as an OS, this could result in catastrophic failure and loss of data. – Alex Jones Apr 20 '18 at 20:26
  • 2
    @AlexanderJ93 Even better than a VM, Kali WSL instance, you can even use a Remote Desktop client if you take the extra steps. – Ramhound Apr 20 '18 at 22:36
  • @EricF - Never say never. While the dual-boot setup _itself_ isn't going to do that, nothing says you can't spin up a VM once you've booted into one OS or the other. Doing that _would_ result in loading both operating systems at the same time, and "split" the system RAM essentially in the way the OP suggests. The bootloader won't load both at the same time. However you may still eventually end up with both loaded at the same time if you so choose. /pedantry – aroth Apr 23 '18 at 12:25
  • 4
    @aroth Running a VM is not what is commonly understood as dual-booting, though. – chepner Apr 26 '18 at 14:05

8 Answers8

245

Others have already answered correctly that no, the RAM would not be split in this case, but I want to add an explanation of why that is the case.

I find a helpful analogy for the workings of a computer is a kitchen. The RAM is the counter space. It's a close-at-hand space for temporarily storing things you are working with. Like a kitchen counter getting cleaned when finished cooking, the RAM is wiped when the computer is powered off. The hard disk is the fridge and pantry, long-term, less easily accessed storage. The data is the ingredients, and programs are recipes. The chef is the operating system.

You are the owner of the house, and currently employ an English chef (Windows). You want to try some recipes from cookbooks that are written in French, but you can't find suitable translations. So you want to hire a chef who speaks French (Linux).

Since the chefs each have their own set of cookbooks and ingredients, they'll each need their own space in the pantry (hard disk) for as long as you employ them. Whether they need to split the counter space (RAM) depends on if they work at the same time. If only one chef is working at a time, they will have exclusive use of all the counter space. The other chef's things are off the counter and in storage. If however, you run two operating systems simultaneously, like telling the chefs to work together, one as Head Chef (host) and one as Sous Chef (virtual), then they will need to split everything. They will have to take turns with the appliances (CPU, GPU, etc) and will need to mark out separate working spaces on the counter to put their cookbooks and ingredients while working.

Jonny Henly
  • 540
  • 6
  • 14
Jared K
  • 2,498
  • 4
  • 10
  • 13
  • 6
    A surprisingly appropriate analogy, might I suggest a (very brief) explanation of virtualisation though? The knowledge of someone coming to this question, might not be high enough to fully grasp what the Sous Chef refers to. Perhaps mentioning hyper-v / vmware to give them something to search for – Michael B Apr 21 '18 at 14:52
  • 1
    and it's RAM, not ram. Totally different things – phuclv Apr 23 '18 at 14:12
  • 3
    The "RAM as a table" analogy is one of my favorites to use. It extends well, even better in a kitchen context: (1) RAM expansion = adding another table or buying a bigger table (2) Virtual memory = if there are more items than can fit on the table, some will have to be put in the pantry, and you'll end up losing time travelling between pantry and bench (3) The table is arranged based on ease of access. The pantry is arranged based on how much you can store in it. (4) Virtual machine = The main chef allows the sous chef to use part of **his** bench – Flater Apr 24 '18 at 10:03
  • 6
    I like how cookbooks act on ingredients, but also get stored with the ingredients. It's perfect for how programs are stored alongside the data. One of my favorite uses was explaining how unchecked pointer errors result in garbage data. If the chef goes to the wrong part of the counter and picks up whatever is there, they can end up putting a cookbook into the blender. :) – Jared K Apr 24 '18 at 17:29
  • 3
    I like your analogy a lot, but I feel like you're missing the section where you explain that dual-booting is analogous to asking one chef to work at a time (e.g. crepes [French] for breakfast, cornish pasties [British] for dinner) while asking them to work together requires virtualization of some variety (hypervisor / emulator). – 3D1T0R Apr 24 '18 at 20:46
  • So why is there not a way to split the RAM between two systems? Without the use of VM. I have two SSDs - for Linux and for Windows. I'd want to power on Windows without powering off Linux. – parsecer Feb 26 '21 at 07:55
74

For dual booting, no... You'll either have one or the other running at one time.

If you want to have both running at once, then you could use a hypervisor.

You might be interested in one of the following:

  • VirtualBox - run Windows or Linux natively, and put the other in a VM - type 2 / hosted
  • ESXi - run both Windows and Linux in a VM - type 1 / native
Mathieu K.
  • 287
  • 2
  • 13
Attie
  • 19,231
  • 5
  • 58
  • 73
  • 19
    So "dual booting" isn't really "dual booting" but "alternative booting". – gnasher729 Apr 21 '18 at 15:54
  • 3
    Yeah!... "_flip-flopping between operating systems_"... I've never really thought about that before. – Attie Apr 21 '18 at 21:52
  • @gnasher729 It's "dual" in the sense that there are two (or more, in a multiboot system) distinct environments to choose between at boot time. Most systems are only ever installed single-boot: there's only one way to _boot_ the hardware. (Recovery environments and etc. notwithstanding.) A second OS running in a VM means the system is still single-boot, since the guest OS never boots to the actual hardware, only the simulated hardware in the virtual environment. Dual/multiboot means multiple OSes with (non-simultaneous) direct access to the physical hardware. – FeRD Apr 22 '18 at 03:57
  • 2
    @gnasher729 I wouldn't call it "alternative" booting, though, because that implies that there's one primary or "main" OS, which isn't the case in multiboot. (Things like recovery environments, _those_ are "alternative" boots, since they rely on and only exist to augment or maintain the primary OS they're associated with.) But with dual/multiboot, the various OSes are completely separate but equal: They don't depend on each other in any way, and whichever one is booted to has full and exclusive command of the system hardware while it's running. – FeRD Apr 22 '18 at 04:01
  • 9
    Think of "dual-boot" in the same sense as "dual-speed motor" — that's not a motor that can somehow go two speeds at once, but rather a motor that offers two distinct gear ratios it can switch between when needed. In that case, as with a dual-boot system, only one can be used at any given time. – FeRD Apr 22 '18 at 04:06
  • @FeRD Conceptually, multiple operating systems in the boot menu are equals. But among these, the "main OS" is the one that boots once GRUB times out. – Damian Yerrick Apr 22 '18 at 19:56
  • 1
    @DamianYerrick I suppose... you also have the compatibility / configurability / etc... of the bootloader - for example, IIRC Windows is virtually unable to manage GRUB. – Attie Apr 22 '18 at 20:07
  • 3
    @DamianYerrick I use Grub with `savedefault`, so the OS that boots whenever grub times out is whatever OS I last booted into. There really is no "main OS", because you could delete **any one** of the OSes installed and all of the others would still function just fine. Conceptually, they are equals. Practically, the only real "main OS" on a multiboot grub system is... well... grub. – FeRD Apr 23 '18 at 03:44
  • @gnasher729 "Dual" doesn't necessarily imply "simultaneously". (For example, enriched uranium has the dual uses of nuclear power generation and nuclear weapons, but any individual lump of uranium is either in a reactor _or_ in a bomb, but not both at the same time.) – David Richerby Apr 26 '18 at 14:19
27

No, they will get 8 GB (provided they are the x64 version of the OS).

When dual booting, only one OS is running at a time.

You do need to give them both hard disk space when you are installing them, but they both get full access to the system RAM when they are booted up.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
Frank Thomas
  • 35,097
  • 3
  • 77
  • 98
  • 4
    To clarify, 32-bit OSes can generally only address about 3.5GB of memory -- mathematically it should be 4GB, but due to reserved address space/etc the actual amount available will be lower. – Doktor J Apr 20 '18 at 16:54
  • Don't forget [PAE](http://en.wikipedia.org/wiki/Physical_Address_Extension). – 3D1T0R Apr 24 '18 at 20:53
22

Unfortunately, "dual booting" doesn't mean you can boot two systems on the same computer at the same time.

It does mean you can boot two systems on the same computer, but still only one at a time.

(It's not limited to two; you could configure a great many more, depending on the boot loader requirements they have. But for some reason two got popular first, so "dual boot" is waay more common than "multi boot".)

Since only one system runs at a time, the running system has full control of all of the RAM, as well as the CPU power and all of the other hardware.

The thing that does get split is disk space. Just how split depends on how cooperative the different systems are. At the very least, you need a separate boot volume for each, and systems that don't get along may be entirely unable to access eachothers filesystems. So that music collection you have in your Windows Media Player won't be so easy to access from Linux. (Generally speaking, different flavors and versions of Linux get along fairly well, and different versions and editions of Windows vary from uncooperative to hostile.)

Since the running system has full control of the hardware, it can do things like reformat the disks the other systems are installed on. That's is how you can add or remove one system while another is running, but as always keep backups of everything and doublecheck what you're doing before you erase or remove any partitions.


As others have said, it is possible to run multiple operating systems on the same computer at the same time, but they do not have equal access to the hardware.

  • The one that boots first, initiated by the ROM BIOS, is the "Host OS", and has full control of the physical hardware, as described above
  • Each additional "Guest OS" must run in a Virtual Machine, initiated by "hypervisor" software, and has as about as much access to the physical hardware as an ordinary application
  • Much like an ordinary application, any memory allocated to a Guest OS is not available for other use by the Host OS while the Guest OS is running. This is the closest thing to splitting RAM between two systems, but isn't limited to two.
  • Sharing data between Host and Guest OSs or multiple Guest OSs is also limited. The virtual hard drives are typically ordinary files in the Host's filesystem, but they contain a potentially incompatible filesystem, and accessing files on other filesystems stored in files may require jumping through more hoops than accessing files on other filesystems stored on physical disks. And, of course, if you get stuck where you can't read the Host's files, you've also lost the Guest's virtual disks.

Using virtual machines is fairly common today, but wasn't widely practical until nearly two decades after the term "dual boot" was well known to power users.


Of course, it's also possible to get two (or more) computers. If your main interest is in trying out more operating systems, and if you have access to a used computer reseller, you could likely get several used computers good enough for experimentation for the price of one shiney new computer that has enough power to run several virtual machines without choking.

ShadSterling
  • 1,459
  • 1
  • 11
  • 20
  • "So that music collection you have in your Windows Media Player won't be so easy to access from Linux." Actually, newer Linux kernel versions (2.6.x and newer) have fairly good built-in NTFS support, so, assuming the files are on your main Windows volume and it isn't encrypted, the Linux installation should be able to access music files stored on the Windows volume. Linux-to-Windows is the hard one, since Windows has zero ext3\4 support, although most consumer Linux distros nowadays have the ability to create an NTFS-formatted volume which could be used for storing the shared music files. – Vikki Apr 20 '18 at 18:47
  • Actually, Windows has support for Ext3 and 4 through 3rd party software (just like Linux depends on ntfs-3g) https://superuser.com/questions/37512/how-to-read-ext4-partitions-on-windows – Elcan Apr 25 '18 at 13:38
  • I said they "*may* be entirely unable to access eachothers filesystems" because there's no bombproof way to ensure access across arbitrary OSs, not because it's never possible. If you're not already familiar with the tools (or if they've changed) it might take days of extra work to set up, and might not do what you want anyway. NTFS is a moving target, the next update might (not will, might) be incompatible with ntfs-3g. The comments on your link suggest that 3rd party software isn't always safe even to install. And even if the FS works, can you add to your Windows Media library from Linux? – ShadSterling Apr 25 '18 at 15:22
15

No.

You can only boot into one OS at a time. Each OS (assuming 64-bit, not 32-bit) will have access to all your RAM.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
Tetsujin
  • 47,296
  • 8
  • 108
  • 135
7

Your RAM does not ever get split. Any currently loaded system has access to all memory within the system. It is volatile, so it is cleared when you turn your computer off.

Aashishkebab
  • 245
  • 1
  • 6
-1

It won't split your RAM in two, but what you should know is that it will most likely split your storage in two, e.g. if you have a 500GB hard disk, you'll have to use part of it for operating system A and part of it for operating system B, be it 250GB for each, 100GB for A and 400GB for B or any other proportion you like.

While you're in complete control over how much storage you dedicate to each operating system, you'll always have to compromise some of it in order to dual boot. Specially because each operating system usually has its own file system, which is often not compatible with other operating systems at all or at least non-trivial to be made compatible with.

-3

No, dual-booting will not split RAM. However, if you're running Kali with a virtual machine (i.e. VMWare) then you have to allocate RAM for the virtual OS.

Datta
  • 15
  • 2
  • 6
    This doesn't add anything to the already existing answers. – ChrisInEdmonton Apr 21 '18 at 14:32
  • i am extremely sorry just joined stack exchange can you give me the link of rules to post comment. – Datta Apr 21 '18 at 14:44
  • @DebojyotyDatta Have a browse of the [tour]. In short, SE is a Q&A site where the answers have to answer the question. Comments are ephemeral and are for clarification about the answer or question. Don't get disheartened, this is how SE maintains a high level of quality. Just have a go at answering another question. – Criggie Apr 23 '18 at 01:25
  • @DebojyotyDatta The only rule you need to know. Don’t submit commentary as an answer. So if you consider what you submitted to be a comment, then it shouldn’t have been submitted, as an answer. – Ramhound Apr 27 '18 at 01:41