title: How can I reset the hard limits?
body: <p>Trying to increase my stack size (the initial value was 8900(more or less)), I did the following:</p>
  
  <pre class="lang-none prettyprint-override"><code>ulimit -s 10000
  </code></pre>
  
  <p>Then my stack size was 10000. Then I did:</p>
  
  <pre class="lang-none prettyprint-override"><code>ulimit -aH
  </code></pre>
  
  <p>From this point on, I could not increase the stack size, it would always say:</p>
  
  <pre class="lang-none prettyprint-override"><code>bash: ulimit: stack size: cannot modify limit: Operation not permitted
  </code></pre>
  
  <p>But I could decrease it. So then I did:</p>
  
  <pre class="lang-none prettyprint-override"><code>ulimit -s 8000
  </code></pre>
  
  <p>And I had stack size 8000.</p>
  
  <p>Now it comes the weird thing and this is that, being the "soft" limit which I am changing, since I did not do anything with <code>sudo</code>, I should be able to go up to 10000 or 9000 again, but is not possible. This made me think that what I changed was the "hard" limit, since it is possible to decrease it, but not increase it, but I did not work from the root!</p>
  
  <ol>
  <li>Is there any possibility that I changed the "hard" limit without using <code>sudo</code>?</li>
  <li>In case I changed the "hard" limit, how can I reset it to the initial default value?</li>
  </ol>