ulimit command on 14.04


I am running 14:04 on one of my machines

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty

uname -a
Linux lucky1 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58
UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

But even as root when I issue the ulimit -a command I get

ulimit: Command not found.

Any idea why this is so and howto fix it would be sincerely appreciated


Re: ulimit command on 14.04

By Nils Kassube at 02/29/2016 - 14:12

Ian A Taylor wrote:
Which shell are you using? The ulimit command should be a builtin
command of bash.


Re: ulimit command on 14.04

By silver.bullet at 02/29/2016 - 14:00

I don't know why you can't run

ulimit -a

as user, but

sudo ulimit -a

can't work, because ulimit is part of the shell and not an external
program, but sudo executes a command and doesn't pass the command to
the invoked shell, OTOH

su -c "ulimit -a"

works, assumed you've set up a root account, since it passes the COMMAND
to the invoked shell. If you'll use sudo, do it like this:

sudo bash -c "ulimit -a"

sudo dash -c "ulimit -a"

sudo sh -c "ulimit -a"

sudo -i
ulimit -a


Re: ulimit command on 14.04

By silver.bullet at 02/29/2016 - 14:08

On Mon, 29 Feb 2016 19:00:54 +0100, Ralf Mardorf wrote:

sudo -s ulimit -a