I want to set systemwide ulimit on ubuntu (all processes, all users).
How can I set it?
You can set these in /etc/security/limits.conf on Red Hat systems. I think it's the same on Ubuntu. It has examples by default, they're pretty straightforward. Post back if you have problems.
In /etc/security/limits.conf add:
You will need to log out and log back in before the limits are applied to your session.