11
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Raspbianでswapを無効化

Last updated at Posted at 2020-05-05

はじめに

Rspberry Piでswapを有効化/無効化する手順について記載する。

swapを無効化

  1. 現在の状況を確認する。

    $ free
    
                  total        used        free      shared  buff/cache   available
    Mem:         378160       55372      231080        2736       91708      270744
    Swap:        102396           0      102396
    
  2. swapを無効化する。

    $ sudo swapoff --all
    $ sudo systemctl stop dphys-swapfile
    $ sudo systemctl disable dphys-swapfile
    $ systemctl status dphys-swapfile
    
  3. 設定変更されたことを確認する。

    $ free
    
                  total        used        free      shared  buff/cache   available
    Mem:         378160       64748      207916        2736      105496      261168
    Swap:             0           0           0
    

swapを有効化

  1. 現在の状況を確認する。

    $ free
    
  2. swapを有効化する。

    $ sudo systemctl start dphys-swapfile
    $ sudo systemctl enable dphys-swapfile
    $ systemctl status dphys-swapfile
    
  3. 設定変更されたことを確認する。

    $ free
    
11
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?