Is swap a partition, but not a paper system? Is that the factor why df doesn"t present it?

Is there a command which deserve to list every the partitions (whether lock hold document systems or not)?


You are watching: A swap partition contains a filesystem

$ df -hFilesystem Size supplied Avail Use% mounted onudev 3.9G 0 3.9G 0% /devtmpfs 788M 1.5M 786M 1% /run/dev/sda3 260G 17G 231G 7% /tmpfs 3.9G 403M 3.5G 11% /dev/shmtmpfs 5.0M 4.0K 5.0M 1% /run/locktmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup/dev/sda4 550G 323G 200G 62% /hometmpfs 788M 56K 788M 1% /run/user/1000tmpfs 788M 4.0K 788M 1% /run/user/1001$ cat /proc/swaps Filename kind Size supplied Priority/dev/sda2 partition 15625212 12653864 -2
ubuntu swap
improve this concern
edited Feb 17 "19 in ~ 15:55


25.1k77 gold badges5151 silver- badges8888 bronze title
inquiry Feb 17 "19 at 15:49

| show 3 more comments

2 answers 2

energetic oldest Votes
Is swap a partition, yet not a document system?

The common means to set up a swap room is indeed to usage a partition (like her /dev/sda2). The swap an are has some identifiers, so it can be determined as such, yet it"s no a file system: it doesn"t save files.

You could of course additionally put swap an are on a record on some regular filesystem.

(I wouldn"t speak swap is a partition, yet in deserve to lie on a partition.)

Is that the factor why df doesn"t present it?

That, and also the reality that df just shows mounted filesystems (visible come the process).

Is over there a command which can list every the partitions (whether castle hold file systems or not)?

All disc partitioning tools; fdisk, sfdisk, GParted, what have actually you. They can or could not show what"s within the partitions though.(/proc/partitions likewise contains a list, but not lot details.)

enhance this prize
reply Feb 17 "19 in ~ 16:16

106k1515 gold badges178178 silver- badges304304 bronze title
include a comment |
Is swap a partition, however not a record system?

A swap document / Partition is simply a huge BLOB where the kernel stores Randomly accessible Memory. Back RAM can contain files, it requirements a lamb DISK counter to execute that.

Is the the factor why df doesn"t show it?

Yes, native the guy page:

NAME df - report paper system disk space usage

Is over there a command which can list all the partitions (whether they hold file systems or not)?

parted --list
improve this answer
edited Feb 17 "19 in ~ 19:10
answer Feb 17 "19 at 16:46


5,46222 yellow badges2020 silver- badges3737 bronze title
add a comment |

your Answer

many thanks for contributing solution to & Linux stack Exchange!

Please be sure to answer the question. Provide details and also share your research!

But avoid

Asking because that help, clarification, or responding to various other answers.Making statements based upon opinion; ago them increase with referrals or an individual experience.

To find out more, check out our tips on writing an excellent answers.

See more: Solution: When I Was 2 My Brother Was Half My Age, When I Was 4 My Brother Was Half My Age Answer

Draft saved
Draft discarded

Sign up or log in

authorize up utilizing Google
sign up using Facebook
sign up utilizing Email and also Password

Post together a guest

email Required, however never shown

Post together a guest


Required, yet never shown

article Your prize Discard

By click “Post her Answer”, girlfriend agree to our regards to service, privacy policy and also cookie plan

Not the price you're spring for? Browse other questions tagged ubuntu swap or ask your own question.

The Overflow Blog
Featured ~ above Meta
How to list disks, partitions and filesystems in Linux?
I have a 24 Gb disk and a 1Tb difficult Disk how do I obtain Ubuntu to install on my 24 GB and my residence dir ~ above the 1TB
increase the size of swap partition
vm.swappiness parameter affect on device without swap partition
Ubuntu Server 16.04 filesystem usage
Doesn't work produce swap ~ above partition
Swap partition and swap paper at the same time?
hot Network questions an ext hot questions

concern feed
i ordered it to RSS
inquiry feed To i ordered it to this RSS feed, copy and paste this URL right into your RSS reader.

* & Linux
stack Exchange Network
site style / logo design © 2021 stack Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.11.12.40742

Linux is a registered trademark that Linus Torvalds. is a registered trademark of The open up Group. This website is not affiliated through Linus Torvalds or The Open group in any way. & Linux stack Exchange works ideal with JavaScript permitted

your privacy

By click “Accept all cookies”, girlfriend agree ridge Exchange have the right to store cookie on your maker and disclose info in accordance with our Cookie Policy.