To create a ramdisk (Ubuntu 18.04), I issued "sudo mkdir /mnt/ramdisk" at the Putty terminal prompt. Then I issued "mount | tail -n 1" and it returned:
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=100912k,mode=700,uid=1000,gid=1000)
Now to unmount I issued "sudo umount /mnt/ramdisk/" but it said not found. So instead I issued "sudo umount /run/user/1000/" (part of the return from the mount command). Then, to be sure it's gone, I issued "mount | tail -n 1" and it returned:
tmpfs on /run/user/0 type tmpfs(rw,nosuid,nodev,relatime,size=100912k,mode=700)
So I issued "sudo umount /run/user/0/"
Finally it's gone.
My questions are:
When I mount a ramdisk at /mnt/ramdisk, how do I know where the ramdisk will actually be mounted so I can unmount it? This was done at the Linux command line, but if I did it with system() in a C program, how can I get the actual mount point to unmount it?
When I unmounted /run/user/1000/ why did it end up at /run/user/0/?
Why didn't it just go to /mnt/ramdisk?