Home > Mobile >  Difference between '#' and '*' character in the ubuntu configuration file
Difference between '#' and '*' character in the ubuntu configuration file

Time:09-23

I am editing my /etc/security/limits.conf file and notice that there are three entries exists in the same file.

* soft     nproc          65535    
# root soft     nproc          65535    
root soft     nproc          65535    

One entry that starts with '#' means, it is commented. The line that starts with out any special character is the one effecting the system.

Wondering what does '*' signifies at the start of the first line in the configuration file, is it a comment or actually affecting the system?

CodePudding user response:

The '*' in this case (and almost all Unix config files) means wildcard (i.e. all) of users/groups. Also note that for security limits, the user root is an exception. If you want to set a limit for root, this field must contain the literal root word.

For more info you can run:

man limits.conf
  • Related