In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to set up exchange files under Linux, Xiaobian thinks it is quite practical, so share it for everyone to make a reference, I hope you can gain something after reading this article.
Create a file of specified size
We need to use dd command to create an empty file of specified size, such as 1G, execute command
dd if=/dev/zero of=/swap bs=1024 count=1048576
In the above command, after "of" is the path where the exchange file is stored. After "bs" is the number indicating the block size. Byte is the unit. Here, it is 1024 bytes, that is, 1KiB. The number after "count" refers to the number of blocks. Formula: Number of blocks * block size = actual size of file.
II. Format the file as an exchange file
execution command
mkswap /swap
The following prompt appears:
Setting up swapspace version 1, size = 1048572 KiBno label, UUID=fefb01a8-6e5b-4e0f-9fde-d7fe3125b86d
III. Enabling Exchange Files
execution command
swapon /swap
Attached:
View swap partition, swap file status
swapon -s#or free
Disable swap partition, swap file
swapoff /swap
(Replace/swap above with the path to your swap partition, file)
About "how to set up exchange files under Linux" This article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.