Linux 開關 swap partitions

# swapon –a

打開所有 swap partitions

# swapoff –a

關閉所有 swap partitions

# blkid
/dev/sda1: LABEL="/" UUID="dec5d8be-d75d-4440-a592-d12e837e90e6" TYPE="ext3" 
/dev/sda2: LABEL="SWAP-hdc2" TYPE="swap" 
/dev/sdb1: UUID="a84e9fa7-255e-435e-8d9f-e5b613895771" TYPE="xfs" 

列出 UUID

# swapon –U 
# swapon –L 

指定某 uuid 或某 label 開啟特定的 swap

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.