Is swap a partition, but not a file system? Is that the reason why df
doesn't show it?
Is there a command which can list all the partitions (whether they hold file systems or not)?
Thanks.
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 788M 1.5M 786M 1% /run
/dev/sda3 260G 17G 231G 7% /
tmpfs 3.9G 403M 3.5G 11% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda4 550G 323G 200G 62% /home
tmpfs 788M 56K 788M 1% /run/user/1000
tmpfs 788M 4.0K 788M 1% /run/user/1001
$ cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 15625212 12653864 -2
sfdisk -d /whatever/file/or/device
. – Feb 17 '19 at 15:50sfdisk -l
is more appropriate – Tim Feb 17 '19 at 15:55parted -l
seems also can do the same – Tim Feb 17 '19 at 16:06lsblk
: https://unix.stackexchange.com/q/157154/80886 – jimmij Feb 17 '19 at 16:20