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

相关推荐
DeeplyMind2 小时前
第12章 Docker存储机制(重要)
运维·docker·容器
鸠摩智首席音效师3 小时前
如何在 Linux 中将文件复制到多个目录 ?
linux·运维·服务器
香蕉你个不拿拿^3 小时前
Linux进程地址空间解析
linux·运维·服务器
云小逸3 小时前
【nmap源码分析】Target 类——目标主机信息管理的核心引擎
服务器·windows·nmap
人间打气筒(Ada)3 小时前
Linux学习~日志文件参考
linux·运维·服务器·学习·日志·log·问题修复
xuhe24 小时前
Claude Code配合Astro + GitHub Pages:为 sharelatex-ce 打造现代化的开源项目宣传页
linux·git·docker·github·浏览器·overleaf
charlie1145141914 小时前
RK3568跑Arch Linux全路程指南(以正点原子的RK3568开发板为例子)
linux·嵌入式·rootfs·教程·环境配置·嵌入式linux·工程实践
OpsEye4 小时前
交换分区优化实战:从监控到调优,让系统告别卡顿
运维·it·监控·告警·swap·监控系统·交换分区
大熊程序猿4 小时前
metabase 报表使用
运维
爆米花byh4 小时前
在RockyLinux9环境的Doris单机版安装
linux·数据库·database