turtlebot3-burger_150.png
turtlebot3-waffle-pi_150.png
turtlebot3-arm_150.png
walking-y2_150.png
turbot3-multi_150.png
turbot3-dl-ros1_150.png
turbot3-ai.png
turbot3-dl-ros2_150.png
turbot3-slam_150.png
turbot3-arm_150.png
turtlebot4-lite_150.png
turtlebot4-pro_150.png
turbot4-dl_150.png
turbot4-ai_150.png
aidriving-racebot_150.png
aidriving-autodrive_150.png
turtlebot-arm_150.png
openmanipulator-x_150.png
Home » TX1入门教程软件篇 » TX1入门教程软件篇-实现扩展swap交换区大小

TX1入门教程软件篇-实现扩展swap交换区大小

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号

TX1入门教程软件篇-实现扩展swap交换区大小

说明:

  • 介绍如何扩展TX1的swap交换区大小
  • 实验是在使用SD card作为启动分区,需要同时增加交换分区

步骤:

  • 创建脚本:
mkdir ~/swap/
cd ~/swap/
vim createSwapFile.sh

  • 脚本内容如下:
#!/bin/bash
#NVIDIA Jetson TX1 in 3D card
#Create a swapfile for Ubuntu at the current directory location
fallocate -l 4G swapfile
#List out the file
ls -lh swapfile
# Change permissions so that only root can use it
chmod 600 swapfile
#List out the file
ls -lh swapfile
#Set up the Linux swap area
mkswap swapfile
#Now start using the swapfile
swapon swapfile
#Show that it's now being used
swapon -s

  • 设置权限:
chmod +x createSwapFile.sh

  • 执行:
sudo ./createSwapFile.sh

  • 创建swap为4G大小swap文件。
  • 设置开机生效:
$ sudo vim /etc/fstab

  • 内容如下:
/home/ubuntu/swap/swapfile none swap sw 0 0


参考:

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号


标签: tx1入门教程软件篇