[晕事]今天做了件晕事22;寻找99-sysctl.conf; systemd

这个文件,使用ls命令看不出来是一个链接。

然后满世界的找这个文件怎么来的,后来发现是systemd里的一个文件。

从systemd的源文件里也没找到相关的文件信息。

最后把这个rpm安装包下载下来,才找到这个文件原来是一个链接

#ll /etc/sysctl.d/99-sysctl.conf

lrwxrwxrwx. 1 root root 14 May 18 11:57 /etc/sysctl.d/99-sysctl.conf -> .../sysctl.conf

所以最好还是从意思里将ll作为列表文件的习惯命令;

ll='ls -la'

-l use a long listing format

-a, --all

do not ignore entries starting with .

这个-l命令可以使用长格式列表,将链接列出来。

那问题是为什么要做99-sysctl.conf,难道是为了确保/etc/sysctl.conf文件里的内容一定是生效的!下面是systemd里的解释:

The systemd-sysctl tool no longer natively reads the file /etc/sysctl.conf. If desired, the file should be symlinked from /etc/sysctl.d/99-sysctl.conf. Apart from providing legacy support by a symlink rather than built-in code, it also makes the otherwise hidden order of application of the different files visible. (Note that this partly reverts to a pre-198 application order of sysctl knobs!)

相关推荐
运维大师11 分钟前
【Linux运维极简教程】11-防火墙与安全加固
运维·安全
hehelm19 分钟前
AI 大模型接入 SDK —项目概述
linux·服务器·网络·数据库·c++
mounter62525 分钟前
跨越鸿沟:从内核驱动开发到超大规模云端生产环境的思考
linux·驱动开发·linux kernel·kernel
Faith_xzc1 小时前
Apache Doris 元数据运维深度解析:从架构原理到故障实战
大数据·运维·doris
kdxiaojie1 小时前
Linux 驱动研究 —— V4L2 (3)
linux·运维·笔记·学习
facaixxx20241 小时前
雨云游戏服务器MCSM面板指南:低延迟BGP线路(一键开服)
运维·服务器·游戏
焦点链创研究所2 小时前
算力核心机器人将于 7 月 18 日发布
运维·服务器·机器人
dddwjzx2 小时前
嵌入式Linux C应用编程——GPIO
linux·嵌入式
dddwjzx2 小时前
嵌入式Linux C应用编程——输入设备
linux·嵌入式
爆浇牛肉面2 小时前
Linux三剑客与管道使用全解析:从入门到实战
linux