У нас вы можете посмотреть бесплатно How to Add Swap Memory to Your Raspberry Pi 5 (Boost Performance!) или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Need more memory on your Raspberry Pi 5 for heavy tasks like compiling, web browsing, or running AI models? In this tutorial, I’ll show you how to add and configure swap memory on your Raspberry Pi 5 using simple terminal commands. This method is safe, easy, and improves performance significantly for low-memory applications. 🔧 What You’ll Learn: What is swap memory? How to add swap to your Raspberry Pi Best swap size for your use case How to make the change permanent Performance tips and warnings COMMANDS ------- === USB SWAP SETUP FOR RASPBERRY PI 5 === This guide sets up a 16GB USB as swap memory. ⚠️ WARNING: This will ERASE all data on the USB drive. BACK UP any important data before proceeding. ============================ STEP 1: List all storage devices ============================ lsblk Find your USB drive. It’s usually /dev/sda1 ============================ STEP 2: Unmount the USB (if mounted) ============================ sudo umount /dev/sda1 ============================ STEP 3: Format USB as a swap partition ============================ sudo parted /dev/sda --script mklabel msdos sudo parted /dev/sda --script mkpart primary linux-swap 0% 100% ============================ STEP 4: Format the partition as swap ============================ sudo mkswap /dev/sda1 ============================ STEP 5: Enable the swap immediately ============================ sudo swapon /dev/sda1 ============================ STEP 6: Confirm swap is active ============================ swapon --show free -h ============================ STEP 7: Make swap permanent (auto-start on boot) ============================ Get the UUID of the USB swap partition sudo blkid /dev/sda1 Copy the UUID output (example): UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" Edit /etc/fstab sudo nano /etc/fstab Add this line at the bottom: (Replace the UUID with yours) UUID=2a501c90-393f-40d4-93c8-4bde3987bf51 none swap sw 0 0 ============================ STEP 8: Optional - Lower swap usage (recommended) ============================ echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf ============================ STEP 9: Reboot to apply changes ============================ sudo reboot ============================ STEP 10: After reboot, confirm swap is still active ============================ swapon --show free -h ✅ DONE: You now have USB swap enabled automatically on every boot.