我有一台双启动系统的电脑,Windows 10 和 Ubuntu。当我第一次安装 Ubuntu 时,我犯了一个错误,只给了根目录 24 GB,现在突然用完了,我把剩余的所有空间都给了主目录(我不记得有多少,但它大于 150 GB)。昨天我试图将 Cuda 安装到我的电脑上,但在安装过程中出现错误,安装停止了。
当我尝试下载任何东西时都会出现此错误:
Reading package lists... Error!
E: Write error - write (28: No space left on device)
我尝试安装 GParted 但出现同样的错误。
当我跑步时
sudo df -h
我得到:
Filesystem Size Used Avail Use% Mounted on
udev 3,8G 0 3,8G 0% /dev
tmpfs 786M 20M 766M 3% /run
/dev/nvme0n1p7 24G 24G 0 100% /
tmpfs 3,9G 217M 3,7G 6% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/loop0 129M 129M 0 100% /snap/vscode/77
/dev/loop1 3,8M 3,8M 0 100% /snap/gnome-system-monitor/70
/dev/loop3 36M 36M 0 100% /snap/gtk-common-themes/1198
/dev/loop2 901M 901M 0 100% /snap/android-studio/70
/dev/loop4 2,3M 2,3M 0 100% /snap/gnome-calculator/238
/dev/loop5 15M 15M 0 100% /snap/gnome-characters/206
/dev/loop7 54M 54M 0 100% /snap/core18/782
/dev/loop10 13M 13M 0 100% /snap/gnome-characters/124
/dev/loop8 15M 15M 0 100% /snap/gnome-logs/45
/dev/loop6 391M 391M 0 100% /snap/clion/58
/dev/loop9 141M 141M 0 100% /snap/gnome-3-26-1604/74
/dev/loop13 35M 35M 0 100% /snap/gtk-common-themes/818
/dev/loop12 2,3M 2,3M 0 100% /snap/gnome-calculator/260
/dev/loop11 1,0M 1,0M 0 100% /snap/gnome-logs/57
/dev/loop14 35M 35M 0 100% /snap/gtk-common-themes/1122
/dev/loop15 141M 141M 0 100% /snap/gnome-3-26-1604/82
/dev/loop16 272M 272M 0 100% /snap/pycharm-community/117
/dev/loop17 13M 13M 0 100% /snap/gnome-characters/139
/dev/loop19 3,8M 3,8M 0 100% /snap/gnome-system-monitor/54
/dev/loop18 15M 15M 0 100% /snap/gnome-logs/43
/dev/loop20 905M 905M 0 100% /snap/android-studio/71
/dev/loop22 366M 366M 0 100% /snap/clion/67
/dev/loop21 92M 92M 0 100% /snap/core/6531
/dev/loop24 4,2M 4,2M 0 100% /snap/gnome-calculator/352
/dev/loop23 906M 906M 0 100% /snap/android-studio/73
/dev/nvme0n1p9 167G 28G 131G 18% /home
/dev/nvme0n1p1 96M 53M 44M 55% /boot/efi
/dev/loop25 144M 144M 0 100% /snap/gnome-3-28-1804/23
/dev/loop26 295M 295M 0 100% /snap/pycharm-community/121
/dev/loop27 3,8M 3,8M 0 100% /snap/gnome-system-monitor/57
/dev/loop28 124M 124M 0 100% /snap/vscode/89
/dev/loop29 391M 391M 0 100% /snap/clion/61
/dev/loop30 90M 90M 0 100% /snap/core/6673
/dev/loop31 91M 91M 0 100% /snap/core/6405
/dev/loop33 125M 125M 0 100% /snap/vscode/87
/dev/loop32 141M 141M 0 100% /snap/gnome-3-26-1604/78
tmpfs 786M 16K 786M 1% /run/user/121
tmpfs 786M 64K 786M 1% /run/user/1000
从结果来看,我认为主分区有 131 GB 的空闲空间。我的问题是,如何才能将主分区的一部分分配给根分区,而不从根分区或主分区数据中删除任何内容?
编辑:我使用了评论中的说明,并从尝试 ubuntu 中打开了 GParted,无需安装。这是来自 GParted 的照片:
我现在应该怎么做?
编辑2:我尝试像图中这样从主目录取消分配内存,现在我该如何将它与根目录合并?