ulimit Linux Command - Explained with Examples

ULIMIT is a built-in Linux command that is used for viewing the resources that are available to each Linux user. Moreover, this command can also be used for limiting these resources so that the multiple users can use the same system with absolute convenience.

Here at LinuxAPT, we shall look into the usage of the ULIMIT command in Linux.


More about ULIMIT Command in Linux

The options of the ULIMIT command can be seen by running the below command:

$ ulimit --help

This will displays the help manual of this command. From here, you can easily find out which options or flags can be used with the ULIMIT command in Linux.


Examples of using ulimit Linux Command 

1. Checking the Resource Availability Status for the Current User

Here, we will use the ULIMIT command for checking the resource availability status for the currently logged in Linux user with the following command:

$ ulimit

From the output, you will see that the resources that are available to the currently logged in user are unlimited.


2. Checking the Detailed Resource Availability for the Current User

You can witness from the previously shared example that the resources that are available to the currently logged in Linux user are unlimited. However, at times, you might want to know the exact number of each of the available resources. In that case, you can run the ULIMIT command in the following manner:

$ ulimit –a

You will see the detailed resource availability report for the currently logged in Linux user.

In this report, you will also be able to see the other flags that can be used with this command for displaying the resource availability of the individual resources.


3. Checking the Hard Limit Value

The hard limit is defined as the upper bound on the soft limit of the available system resources. The ULIMIT command can also be used for printing the hard limit value on the terminal by running it in the following manner:

$ ulimit –Hn

The output will display the hard limit value for the currently logged in Linux user.


4. Checking the Soft Limit Value

The soft limit is the maximum number of resources that are allocated for performing a particular process. The ULIMIT command can even be used for displaying the soft limit value on the terminal by running it in the following manner:

$ ulimit –Sn

This will display the soft limit value for the currently logged in Linux user.


[Need help in fixing Linux system issues ? We can help you. ]

This article covers an overview of the ULIMIT command in Linux. In fact, ULIMIT command is used for viewing or limiting the resources available to the Linux users. 

Related Posts