-
-
Save duylddev/b9af3bdffd0492dd5f3fb06b9d4812f3 to your computer and use it in GitHub Desktop.
Create a Swapfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#NVIDIA Jetson TK1 | |
#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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment