This page has been tested on the version 14.04 of Ubuntu.
/proc/sys/kernel/shmmax contains the shared memory maximum size. The following command displays the shared memory current size:
The following command allows you to resize the shared memory limit. This is a temporary solution (until next reboot). The size is in bytes.
sudo sysctl -w kernel.shmmax=64000000
Edit the file /etc/sysctl.conf with the following command. The size is in bytes.
sudo gedit /etc/sysctl.conf
Modify or add the following line in the file: