Skip to content

Instantly share code, notes, and snippets.

@jetsonhacks
Created October 4, 2014 21:19
Show Gist options
  • Select an option

  • Save jetsonhacks/b80d6130066e3f351bc8 to your computer and use it in GitHub Desktop.

Select an option

Save jetsonhacks/b80d6130066e3f351bc8 to your computer and use it in GitHub Desktop.

Revisions

  1. jetsonhacks created this gist Oct 4, 2014.
    16 changes: 16 additions & 0 deletions createSwapfile.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #!/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