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

相关推荐
学嵌入式的小杨同学21 分钟前
从零打造 Linux 终端 MP3 播放器!用 C 语言实现音乐自由
linux·c语言·开发语言·前端·vscode·ci/cd·vim
EverydayJoy^v^24 分钟前
RH134学习进程——十二.运行容器(1)
linux·运维·容器
syseptember26 分钟前
Linux网络基础
linux·网络·arm开发
b***251143 分钟前
电池组PACK自动化生产线的关键流程与核心优势
运维·自动化
zl_dfq1 小时前
Linux 之 【多线程】(线程的概念、Linux中的线程、页表)
linux
郝亚军2 小时前
如何在Ubuntu和win10/11之间通过samba访问对方的文件
linux·服务器·ubuntu
曦云沐2 小时前
【避坑指南】Ubuntu更新报错“Repository is not signed”的快速修复
linux·ubuntu·docker
哲伦贼稳妥2 小时前
职场发展-遇到以下情况请直接准备后手吧
运维·经验分享·其他·职场和发展
带土13 小时前
10. .out文件
linux
Exquisite.3 小时前
企业高性能web服务器(4)
运维·服务器·前端·网络·mysql