Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux 7.7Setting the swap partition SWAP

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Create the swap partition file [root@devsz wxadmin] # dd if=/dev/zero of=/opt/swapfile bs=1M count=4096 4096800 records in4096+0 records out4294967296 bytes (4.3GB) copied, 20.789 s, 207MB/s2. Authorize a document

[root@devsz wxadmin] # chmod 600 / opt/swapfile

3. Format the exchange partition [root@devsz wxadmin] # mkswap / opt/swapfile Setting up swapspace version 1, size = 4194300 KiBno label, UUID=bfe83644-0fa0-43f9-bf7e-69f9e24b391f4. Open the swap partition

[root@devsz wxadmin] # swapon / opt/swapfile

5. Check the swap partition status [root@devsz wxadmin] # free-m total used free shared buff/cache availableMem: 3789 2682 208 280 898 586Swap: 4095 0 4095 [root@devsz wxadmin] #

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report