this post was submitted on 17 May 2025
69 points (98.6% liked)
Linux
54222 readers
591 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Edit I haven't tried this myself, but from what I can find the gparted part is not necessary. You can get rid of Windows and re-use it for Linux with a single command:
btrfs device add / /dev/old_windows_partition
. The rest of the considerations below still apply.The answer to the question you asked is: make sure you know which partition it is and run
dd if=/dev/random of=/dev/<partition> bs=1024
. Then you'll probably want to find which boot loader you're using and remove the Windows option. That will delete Windows.To re-use the free space, which most folks are focusing on, might be far easier than all of the other comments.
Odds are decent that you're using btrfs. Most reasonable Linux distros default to it, so unless you changed it, it's probably btrfs. With btrfs, you can simply change the position type and add it to your existing filesystem.
gparted
. You can do all of this on the command line with fdisk, but gparted is a GUI program and is easier if you're more comfortable with GUIs. Find the Windows partition, make sure you now it's the Windows partition and not the boot partition (the boot partition will be the really tiny one), click on the Windows partition and choose the "change partition type" function to switch it to a Linux partition. There will be warnings; heed them, double check, and then save and exit.btrfs device add / /dev/sdx2
. This adds the partition/dev/sdx2
to the filesystem mounted at/
-- your root partition. Replace/dev/sdx2
with whatever partition Windows used to be on.That's it. Now your Linux filesystem is using the old Windows partition. Without changing the boot options, when you reboot your system may still believe there's a Windows to boot into. If you're using EFI, it should just disappear, but with grub you'll have to tell grub that Windows isn't there anymore or else it'll keep offering it to you at each boot.
You are almost certainly not using RAID, so you don't need to worry about rebalancing.
Summary: it is very likely your distribution used btrfs for your Linux partition. In that case, the absolute easiest way to get rid of Windows and use it for Linux is to add the partition to your btrfs filesystem. No reformatting, repartitioning, reinstalling; just tell btrfs to use it and you're done.