Ulimit and its functions value in Linux

Unix (all-caps UNIX for the trademark) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, developed in the 1970s at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.

HI

What is mean by Ulimit in linux. How can we set the ulimit value permanently in linux

Also let us know the advantages of ulimit.

@iamarunk1898,
Not sure why you included that first paragraph about Unix as it is irrelevant to your question. That said, let me skip to your question. In short, ulimit will allow you to place limits on the usage or resources in your system. I could go on but you can read more about it in this link. Hope it helps!

HI

Thanks for your reply. While posting it asked me to create minimum 132 character. That is the reason i have posted that one

@balajitk88 @iamarunk1898
Yes, a topic should be 250 character must to avoid any irrelevant questions with short description about topics. But it doesn’t mean that you should copy and paste the content from other sites… You must describe your question and problem in your own words to keep this forum clean and topic related…I hope you understand and follow forum guidelines next time…

1 Like

Sorry for the inconvenience. I will follow the forum guidelines and make forum clean

ulimit is a builtin command and system does not allow to create some resource larger than specified in ulimit
execute “ulimit -a” and see result
you can add your ulimit command under /etc/profile
ulimit will apply to all users when they login

Ulimit will restrict the users to use the resources of the system for example when a user starts too many processes and therefore makes the system unresponsive for other users.

once look ta the below screen shot by using the command #ulimit -u 50 we can allow a user to access up to an particular no.of processes

And one more thing you should note allowing too small number of processes can break the use of portage. So, don’t be too strict.

1 Like

HI All

Thanks for your reply and support now i can understand about ulimit.

Hi raghuu

Pls let us know how can we permanently set this ulimit -u 50.

Hi

For that you have to edit the file limits.conf under /etc/secutrity

# vim /etc/security/limits.conf

* soft nproc 50 -------> by adding this line you can set it permanently

and here * is for all you can also mention username instead of *
@raghu soft nproc 50

for checking login as user and run the command ulimit -a

1 Like

HI raghuu

Thanks for your reply its very helpful to me.