Settling Limits with ulimit

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hey, Cybrarians. Welcome back to
00:00
the Linux plus course here in Cybrary.
00:00
I'm your instructor, Rob Goelz.
00:00
In today's lesson, we're going to cover
00:00
setting limits with ulimit.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand the purpose of
00:00
the ulimit command and explain how
00:00
ulimit can be used to restrict user accounts.
00:00
Each user on a system is going to consume resources,
00:00
whether it be CPU or memory or file space,
00:00
>> and without a guard rail on the system,
00:00
>> it's really easy for a user to overload the system.
00:00
We have the ulimit command
00:00
which allows us to restrict user
00:00
access to system resources.
00:00
Now there are a huge number of
00:00
options that are available to ulimit,
00:00
but I find a few to be the most useful options around.
00:00
For example, we could do ulimit -a to see
00:00
the limits that are set on the current user account.
00:00
We could use ulimit -f to
00:00
set the limit on the size of files created.
00:00
If we do the -l option,
00:00
it sets the maximum memory
00:00
that can be locked by the user.
00:00
So l for locked.
00:00
>> ulimit -t sets
00:00
>> the maximum CPU time that a user is allowed.
00:00
Now this is just something
00:00
>> that's configured on the fly.
00:00
>> If we want to make these options permanent,
00:00
they need to be placed in a configuration file.
00:00
That could be the user configuration file,
00:00
which would be in the user home directories, so ~/,
00:00
>> it can be bashrc or profile,
00:00
>> or it could be in the global configuration files,
00:00
>> which are located at /etc/bashrc or /etc/profile.
00:00
>> But with that, we reached into this lesson,
00:00
>> and in this lesson, we covered the
00:00
>> purpose of the ulimit command.
00:00
>> Then we talked about how ulimit can
00:00
be used to restrict user accounts.
00:00
Thanks so much for being here,
00:00
>> and I look forward to seeing you in the next lesson.
Up Next