1
0
Fork 0
RobotKernal-UESTC/Code/MowingRobot/pibot_ros/pibot_create_swap.sh

11 lines
283 B
Bash
Raw Permalink Normal View History

2024-06-04 16:44:33 +08:00
#!/bin/bash
sudo mkdir /opt/image
cd /opt/image/
sudo touch swap
sudo dd if=/dev/zero of=/opt/image/swap bs=1024 count=2048000
sudo mkswap /opt/image/swap
sudo swapon /opt/image/swap
echo "add \"/opt/image/swap /swap swap defaults 0 0\" to \"/etc/fstab\" to make swap effecive"