I'm running Ubuntu 13.04 and I removed by mistake few folders from /dev/. As a result i have some problems with some applications like Chrome, which is not able to work.

  • 2
    Most of the contents of /dev/ are created dynamically. Have you tried rebooting? – user21322 Mar 12 '14 at 12:45

/dev/shm is a way processes use to share memory (see man shm_open for more information). Its content is determined by the processes you run, therefore you can't "download" it. You can however re-create it.

On Ubuntu, /dev/shm is a symlink to /run/shm; this is the command that you have to use to re-create it:

sudo ln -s /run/shm /dev/shm

This action is also performed by the /etc/init/mounted-dev.conf Upstart script. This means that (as it was already suggested) rebooting your system without doing anything special is an another way of fixing the problem.


/dev/shm is nothing but implementation of traditional shared memory concept. It is an efficient means of passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux.

you need to add or modify entry in /etc/fstab file so that system can read it after the reboot. Edit, /etc/fstab as a root user, enter:

sudo gedit /etc/fstab

add /dev/shm entry as follows to set size to XXGB

none      /dev/shm        tmpfs   defaults,size=XXG        0 0

replace XX by the size you wish to use as shared memory.

Save and close the file.

Now reboot.

If you just want to restore your old /dev/shm file then use the current running memory which is a copy of /dev/shm

sudo cp /run/shm /dev/shm -r

then reboot

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.