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

相关推荐
小黑_深呼吸28 分钟前
Prometheus实战教程:k8s平台-Mysql监控案例
运维·学习·kubernetes·prometheus
ALex_zry32 分钟前
Ubuntu 20.04 C++开发环境搭建指南(2025版)
linux·c++·ubuntu
疯狂的挖掘机1 小时前
记一次从windows连接远程Linux系统来控制设备采集数据方法
linux·运维·windows
斯密码赛我是美女1 小时前
ssti刷刷刷
java·服务器·前端
忧郁的狐狸1 小时前
Jenkins 安装与配置指南
运维·jenkins
搬码临时工2 小时前
如何更改远程桌面连接的默认端口?附外网访问内网计算机方法
服务器·网络·远程工作·访问公司内网
sy_cora2 小时前
IEEE 列表会议第五届机器人、自动化与智能控制国际会议
运维·人工智能·机器人·自动化
sz66cm2 小时前
Linux基础 -- 用户态Generic Netlink库高性能接收与回调框架
linux
数巨小码人2 小时前
Linux常见命令
大数据·linux·运维·服务器·elasticsearch·搜索引擎
家庭云计算专家2 小时前
还没用过智能文档编辑器吗?带有AI插件的ONLYOFFICE介绍
服务器·人工智能·docker·容器·编辑器