Where is my /tmp mounted?
If the output is as above, it's on the hard disk. You can get /dev/root
by looking at the kernel commandline:
$ cat /proc/cmdline | grep root
BOOT_IMAGE=/boot/vmlinuz-3.19.0-32-generic root=UUID=0cde5cf9-b15d-4369-b3b1-4405204fd9ff ro
So /dev/root
is equivalent to the partition with the UUID printed above; your's will differ. To look this UUID up, use
$ sudo blkid
/dev/sda1: UUID="0cde5cf9-b15d-4369-b3b1-4405204fd9ff" TYPE="ext4"
/dev/sda5: UUID="37bc6a9c-a27f-43dc-a485-5fb1830e1e42" TYPE="swap"
/dev/sdb1: UUID="177c3cec-5612-44a7-9716-4dcba27c69f9" TYPE="ext4"
As you can see, the matching partition is /dev/sda1
. So your /tmp
is on the hard disk. Another giveaway in the output of df
is the mountpoint /
. If you mounted /tmp
in the RAM, you'd instead get
$ df /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 3640904 20 3640884 1% /tmp
The output of df /tmp
gives the answer: the “Mounted on” column lists /
, so /tmp
is part of the filesystem that's mounted on /
, i.e. the root filesystem. It is not a separate filesystem.
To be more accurate, you should run df /tmp/
: if /tmp
is a symbolic link, then df /tmp
lists information about the location of the symbolic link, whereas df /tmp/
lists information about the target directory.
The mention of /dev/root
in the device column is due to its being listed in /etc/mtab
. You can find the real device by looking in /proc/mounts
with </proc/mounts awk '$2 == "/" {print $1}'
or findmnt /
.