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

11 lines
283 B
Bash
Raw Normal View History

2023-12-11 11:17:13 +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"