我在安装过程中没有使用交换分区,所以现在我的 ubuntu 已经安装好了,我使用 GParted 分区编辑器创建了一个未分配的分区,我将其格式化为 linux-swap。它没有自动挂载,所以我右键单击它并选择 swapon。现在,每当我启动笔记本电脑时,分区都不会自动挂载。Swapon 仍然有效,但如果分区在启动时没有挂载,它就没用了。我看到一些答案说要编辑一些名为 Fstab 的文件,但我不确定要进行哪些更改...请帮助我,提供分步说明,因为我是一个全部的我是菜鸟,不了解 Ubuntu,我遇到了很多问题...请帮帮我!:'( :( 这是我的 fstab 文件包含的内容-
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=33a0fc77-06b0-406c-95fd-15bf7033b619 / ext4 errors=remount-ro 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
答案1
这是你之前的/etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=33a0fc77-06b0-406c-95fd-15bf7033b619 / ext4 errors=remount-ro 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
现在,要将交换分区添加到其中,请执行以下操作:
答案2
在终端中输入:
gnome-disks
然后选择交换分区。在设置菜单中选择“编辑坐骑”选项。