Multinucleated cells are important in many organisms but the mechanisms governing the movements of nuclei sharing a common cytoplasm are not understood. In the hyphae of the plant pathogenic fungus Ashbya gossypii, nuclei move back and forth, occasionally bypassing each other, and, preventing the formation of nuclear clusters, this is essential for genetic stability. These movements depend on cytoplasmic microtubules emanating from the nuclei, that are pulled by dynein motors anchored at the cortex. Using 3D stochastic simulations with parameters constrained by the literature, we predict the cortical anchors density from the characteristics of nuclear movements. Altogether, the model accounts for the complex nuclear movements seen in vivo, using a minimal set of experimentally determined ingredients. Interestingly, these ingredients power the oscillations of the anaphase spindle in budding yeast, but in A. gossypii this system is not restricted to a specific nuclear cycle stage, possibly as a result of adaptation to hyphal growth and multinuclearity.