Home  >  Article  >  System Tutorial  >  What should I do if deepin does not have a swap partition? What should I do if deepin does not have a swap partition?

What should I do if deepin does not have a swap partition? What should I do if deepin does not have a swap partition?

王林
王林forward
2024-02-29 10:10:22907browse

php editor Xinyi will answer your question about deepin not having a swap partition. When using the deepin system, if a swap partition is not created for the system, system performance and stability may be affected. However, don’t worry, we can solve this problem through other methods, such as creating a swap file or using a swap partition. Next, let us learn about the solution to the problem that deepin does not have a swap partition, so as to improve the system performance!

What to do if deepin does not have a swap partition:

1. During installation

1. If we do not have swap when installing the system partition, as shown in the figure.

2. At this time, you can exit the installation program first, then select swap under the file system item, and then install it.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

2. Cannot find swap

1. If we created a swap partition during installation but cannot find it when using it, it may be a resolution problem.

2. At this time, we can try to enter the grub interface and add vga=z342 after the startup item to use 1152*864 resolution.

3. Because some computers have screen and other hardware problems, using a larger resolution will cause the swap partition to be unable to be displayed.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

3. Create a new swap

1. If swap is not installed during our installation, we can create a swap partition through the new method.

2. First click the launcher in the lower left corner, and then enter " Deepin Terminal"

deepin没有swap分区怎么办 deepin没有swap分区解决方法

3. Enter "sudo passwd root" to add the root password to the user.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

4. After the setting is completed, enter "su" to use the root user.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

5. Then enter "dd if=/dev/zero of=/swapfile count=4096 bs=1024k" to create a 4G swap partition.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

6. Then enter "mkswap /swapfile". The path should be consistent with the above to swap partitions.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

7. Then use the "swapon /swapfile" command to mount the swap partition.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

8. If you want to view partition information, execute the "top" command to view it.

deepin没有swap分区怎么办 deepin没有swap分区解决方法

You may also want to read: Details of how large a partition is suitable|How to set up Task Manager shortcut keys

The above is the detailed content of What should I do if deepin does not have a swap partition? What should I do if deepin does not have a swap partition?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete