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

相关推荐
mc235617 小时前
Linux实用操作
linux·运维·服务器
半梦半醒*17 小时前
k8s——pod详解2
linux·运维·docker·容器·kubernetes·负载均衡
vvw&18 小时前
如何使用 Nodemon 自动重启 Node.js 应用
linux·运维·服务器·node.js
GIS数据转换器18 小时前
2025无人机在电力交通中的应用实践
运维·人工智能·物联网·安全·无人机·1024程序员节
Bdygsl18 小时前
Linux(3)—— 权限操作
linux
奔跑吧邓邓子18 小时前
【C语言实战(75)】C语言内存探秘:泄漏检测与分析实战
linux·c语言·windows·内存·开发实战·泄露检测
Elendill18 小时前
【Ubuntu】Ubuntu 服务器升级系统操作记录
运维·服务器·ubuntu
北亚数据恢复18 小时前
服务器数据恢复—Raid5阵列热备盘同步失败,数据恢复揭秘
运维·服务器
利刃大大19 小时前
【高并发服务器:HTTP应用】十五、HttpRequest请求模块 && HttpResponse响应模块设计
服务器·c++·http·项目
Matana11119 小时前
Vmware中主机ip a没有ip地址
服务器·网络·tcp/ip