[晕事]今天做了件晕事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!)

相关推荐
aitav011 分钟前
⚡ arm 32位嵌入式 Linux 系统移植 NTP 服务
linux·arm开发·ntp
weixin_4569042716 分钟前
工业自动化通信控制
运维·struts·自动化
爱奥尼欧30 分钟前
【Linux笔记】网络部分——socket 编程 TCP实现多台虚拟机使用指令访问云服务器
linux·服务器·网络
yolo_guo35 分钟前
sqlite 使用: 03-问题记录:在使用 sqlite3_bind_text 中设置 SQLITE_STATIC 参数时,处理不当造成的字符乱码
linux·c++·sqlite
m0”-“0m1 小时前
MySQL、Nignx和Docker在Linux上的安装详解
linux·数据库·mysql
野犬寒鸦1 小时前
从零起步学习Redis || 第十章:主从复制的实现流程与常见问题处理方案深层解析
java·服务器·数据库·redis·后端·缓存
luopandeng1 小时前
amd npt技术 对比 intel ept 技术
java·linux·网络
---学无止境---2 小时前
Linux中kmalloc内存分配函数的实现
linux
帅帅梓2 小时前
nginx访问控制 用户认证 https
运维·nginx·https
海底列车2 小时前
ubuntu-20.04.6升级OpenSSH_10.2p1
linux·服务器·ubuntu