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

相关推荐
ljs6482739511 分钟前
智慧商城(Smart Mall):基于 Spring Boot + Vue 3 的现代化电商平台实战
linux·vue.js·spring boot·后端
run21professional18 分钟前
系统包管理器和语言级包管理器的区别,及其源配置
linux
阿成学长_Cain20 分钟前
Linux grpck命令超全详解|校验组文件完整性、修复/etc/group错误实战
linux·运维·服务器·网络
进击切图仔21 分钟前
基于千问的白盒蒸馏 SOP
运维·服务器·人工智能·python·效率
杖雍皓34 分钟前
没有服务器如何构建现代 Web 应用:平台选型与组合策略
运维·服务器·前端·react.js·github·netlify·vercel
指尖的爷36 分钟前
Ubuntu 24.04 彻底关闭自动更新(桌面+服务器通用)
服务器·数据库·ubuntu
德迅--文琪43 分钟前
游戏运营生命线:服务器选型标准与 DDoS 防护的核心价值
服务器·游戏·ddos
山川而川-R43 分钟前
创建openclaw-Agent_篇二
服务器
Yana.nice1 小时前
Weblogic日志体系
linux
阿拉斯攀登1 小时前
内核模块开发:module_init 与模块机制详解
linux·网络·嵌入式硬件·linux驱动