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

相关推荐
ZKNOW甄知科技2 小时前
重构企业运维智慧:低代码 ITSM 知识管理平台的创新与实践
大数据·运维·人工智能·程序人生·低代码·重构·it
HalvmånEver2 小时前
Linux:基础开发工具(三)
linux·运维·服务器·开发语言·学习·gcc/g++
LCG元2 小时前
实战:用 Rsync 实现服务器间的高效增量同步与备份
linux
阿巴~阿巴~2 小时前
UDP服务端绑定INADDR_ANY后,客户端该用什么IP访问?
服务器·网络·udp协议·网络测试·udp套接字编程·inaddr_any
曹牧2 小时前
Oracle:查询当前正在等待执行的SQL语句
linux·数据库·oracle
孙12~2 小时前
两台虚拟机搭建多机区块链网络
linux·ubuntu·区块链·学习方法
大Null3 小时前
Linux安装GO环境
linux·golang
百***34133 小时前
Nginx实现接口复制
运维·nginx·junit
wanhengidc3 小时前
巨 椰 云手机稳定挂机 搬砖
运维·服务器·游戏·智能手机·云计算
LCG元3 小时前
Linux 网络调试神器:tcpdump 和 Wireshark 抓包分析实战
linux