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

相关推荐
ulias21213 小时前
Linux中的开发工具
linux·运维·服务器·开发语言·c++·windows
wanhengidc13 小时前
服务器如何防范爬虫攻击?
运维·服务器·网络·爬虫·游戏·智能手机
qq_2546177713 小时前
windows脚本.bat实现:自动化远程登录or推文件到板子
linux·自动化
姜太小白13 小时前
【Linux】CentOS 7 VNC 远程桌面配置
linux·python·centos
mobai713 小时前
使用pyang将yang模型转换为xml
xml·运维·服务器
捞的不谈~13 小时前
解决在Ubuntu系统下使用Lucid 相机(HTR003S-001)-Ubuntu 20.04系统遇到GLIBC和GLIBCXX版本不兼容的问题
linux·运维·ubuntu
悠然南风13 小时前
【云原生学习】Linux网络知识操作精讲 + 实战踩坑
linux
李李李li13 小时前
linux x86 离线安装docker 27.5.0
linux·docker·eureka
TG_yunshuguoji13 小时前
腾讯云代理商:腾讯云部署OpenClaw 如何接入自定义大模型?
服务器·云计算·腾讯云·openclaw
洛菡夕13 小时前
LVS+Keepalived高可用群集
运维·服务器·lvs