临时关闭

swapoff -a

永久关闭

vi /etc/fstab

注释掉最后一行 /swap.img

# /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/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-Bd1Y18z2BDUtZLfxa6xAkBwmdM5CJWzJ6VffRRnKPUXYwBOeeGpa3aVDru0ReKDB / ext4 defaults 0 0
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/78606f3c-cc6d-4bf2-b0c1-e8a3f27847b4 /boot ext4 defaults 0 0
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/E557-046B /boot/efi vfat defaults 0 0
# /swap.img     none    swap    sw      0       0
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐