sudo ulimit -s 16384
does not start a shell. Here sudo
runs ulimit
with arguments directly. This will throw command not found
unless ulimit
exists as a separate executable (and it may exist, like cd
). If ulimit
exists as a separate executable in the right place then sudo ulimit -s 16384
will "succeed", still without affecting the current shell. The conclusion and the gist of this answer is right; "sudo
started a new shell, where it ran ulimit
" is wrong.