How to expand the capacity of Ubuntu in a dual system.

To expand the space on Ubuntu, you can follow these steps:

  1. To shrink a Windows partition in Windows: Open the “Disk Management” tool, right-click on the Windows partition, select “Shrink Volume” and specify the amount of space to be released.
  2. Create a new partition: create a new partition on the freed-up space. You can complete this operation using either the “Disk Management” tool or a third-party partition management tool.
  3. Format the new partition: Format the new partition as EXT4 file system, which is the file system used by Ubuntu. You can use tools like GParted to format the partition.
  4. Mounting a new partition: Open the terminal and run the following command to view the identifier of the new partition:
  5. Use the command “sudo fdisk -l”
  6. Identify the new partition with a label typically represented in the form of “/dev/sdXn”, where X is the disk number and n is the partition number.
  7. Then create a new mount point, such as “/media/newdrive”, and run the following command:
  8. Create a new directory named “newdrive” in the “/media” directory.
  9. Next, mount the new partition onto a new mount point and run the following command:
  10. Mount the specified device (/dev/sdXn) to the /media/newdrive directory using superuser privileges.
  11. To update the /etc/fstab file, use the following command to open the /etc/fstab file:
  12. Edit the /etc/fstab file using sudo nano.
  13. Add a line at the end of the file to automatically mount the new partition, for example:
  14. Mount the /dev/sdXn partition to /media/newdrive with ext4 file system using default settings.
  15. Save the document and exit.
  16. Expand Ubuntu partition: Open GParted or another partition management tool, select the partition where Ubuntu is located, right-click on the partition, choose “Resize/Move,” and adjust the size of the partition to the desired size.
  17. Please make sure to backup important data and ensure there is sufficient power before adjusting partition sizes to prevent data loss in case of interruption.
  18. Update file system size: To update the size of the file system, run the following command in the terminal:
  19. Run the command “sudo resize2fs /dev/sdXn”
  20. This will allow the file system to use the newly adjusted partition size.

After completing the above steps, the partition size of Ubuntu will be expanded.

bannerAds