But now, a follow-up question: from the ulimit’s man page it seems that the change only applies to the current shell and its descendants. How do I make the change permanent and system-wide?
Notice the prompt:
"The prompt for the root user in Linux is in the format
[root@localhost ~] #.
The # symbol indicates that the user is in the root account. "
This might provide some info (this is just a snippet):
:~> cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - a user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
# ...
Well, of course every user can change his/her shell prompt to his/her liking. But by default, the default prompt for root is different from the one for other users (remark that those defaults maybe different for different shells). And assuming that not many users change from it, it is the main reason why we ask to include the prompt (together with the command) when posting code in the forums. From the (default) prompt one can read the user (most important root or not), the working directory (often important when no absolute paths are shown in commands) and the host name (often not so important, but can be when it is about networking).
I really doubt that you want to change something in /proc/self/.
boven:/proc # ls -l self
lrwxrwxrwx 1 root root 0 Dec 4 08:46 self -> 11015/
boven:/proc #
This points to the “current running process”, which is the ls command from the code above. When you do this several times you will see a different PID each time.
I doubt you want to change the limits of that current running ls process, it will be finished before you can say “Jack Robinson”.
Yeah, I’m fully aware of this. I’ve just been using Linux/BSD for close to 30 years, and wasn’t ever aware there was some hard and fast rule about the Prompt indicating whether one was at a user, or root prompt, just by the last character in the prompt.
Not saying you’re not right, just not something that ever came to my attention.