12

I'd like to change the default size of /dev/shm in Lubuntu 11.10 (also known as /run/shm now, I guess).

It doesn't seem to appear in my fstab:

# / was on /dev/sdb5 during installation
UUID=66ac63f0-45fa-4766-9d20-7c56bcd0460d /               ext3    noatime,errors=remount-ro 0       1
# /home was on /dev/sdb7 during installation
UUID=227f1b29-5d04-4c28-9c9c-ea70b1726434 /home           ext3    noatime         0       2
# swap was on /dev/sdb6 during installation
#UUID=9e13b7cc-1f75-4b4e-9e79-c0f7368de353 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0
tmpfs /var/tmp tmpfs defaults,noexec,nosuid 0 0
5

Try putting a /dev/shm line in the fstab file to override the default settings:

tmpfs /dev/shm tmpfs defaults,noexec,nosuid,size=100M 0 0

If that doesn't work, you can try remounting it after it's been mounted at boot, for example by putting this line into the /etc/rc.local file

mount -o remount,size=100M /run/shm
  • 1
    The remounting works. The fstab suggestion does not. We need something better... – Richard Feb 27 '12 at 18:45
  • Leastwise, this doesn't work in 11.10: see comments here. – Richard Feb 27 '12 at 18:59
  • 1
    Shouldn't it be /dev/shm? – fuenfundachtzig Nov 27 '17 at 21:58
  • Mine is filling up with pulse-shm-##### files and I need to know why I should allow it to do it at all. Certainly I don't want my SSD filling up with temp files at all. The whole system is on a 160 SSD. – SDsolar Mar 5 '18 at 20:32
0

Temporary increase tmpfs filesystem

1) Open /etc/fstab with vi or any text editor of your choice,

2) Locate the line of /dev/shm and use the tmpfs size option to specify your expected size, - e.g. 512MB:

tmpfs      /dev/shm      tmpfs   defaults,size=512m   0   0

e.g. 2GB:

tmpfs      /dev/shm      tmpfs   defaults,size=2g   0   0
mount -o remount /dev/shm
  • It doesn't seem to appear in my fstab – Michael Apr 20 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.