To increase the maximum number of open files (also known as file descriptors or FDs) in Linux, you can use one of the following methods:
cat /proc/sys/fs/file-max
fs.file-max = NEW_VALUE
Replace "NEW_VALUE" with the desired value. For example, to increase the value to 100000, use the following line:
fs.file-max = 100000
sysctl -p
ulimit -n
ulimit -n NEW_VALUE
Replace "NEW_VALUE" with the desired value. For example, to increase the value to 100000, use the following line:
ulimit -n 100000
source ~/.bashrc
* soft nofile NEW_VALUE * hard nofile NEW_VALUE
Replace "NEW_VALUE" with the desired value. For example, to increase the value to 100000, use the following lines:
* soft nofile 100000 * hard nofile 100000
ulimit -n NEW_VALUE
Note: The above methods increase the maximum number of open files for the system or user. However, the actual number of open files that a program can have is limited by the available system resources, such as memory and CPU. Additionally, the maximum number of open files may also be limited by the kernel parameter "fs.nr_open", which specifies the maximum number of file handles that the system can have at any given time.