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

相关推荐
APItesterCris20 分钟前
实战教程:借助 Open Claw + 淘宝商品 API,低成本实现电商自动化监控与智能选品
大数据·运维·自动化
三千里1 小时前
ZSH的简单配置
linux·zsh·terminal
Jinkxs1 小时前
Python基础 - 文件的写入操作 write与writelines方法
android·服务器·python
提伯斯6461 小时前
解决Fast-Drone-250编译相关错误
linux·ros·无人机·fast-drone
liulilittle2 小时前
过冲:拥塞控制的呼吸与盲行
linux·网络·c++·tcp/ip·计算机网络·tcp·通信
风曦Kisaki2 小时前
# 自动化运维Day03:Ansible模块进阶(setup,debug),四种常用变量,进阶语法;Ansible Roles(角色)
运维·自动化·ansible
无足鸟ICT2 小时前
【RHCA+】三种工作模式
linux
兮动人2 小时前
服务器流量监控与性能优化实战
服务器·网络·性能优化·服务器流量监控与性能优化实战
Dlrb12112 小时前
Linux系统编程-会话、守护进程与系统日志
linux·守护进程·会话·进程组·系统日志
赵民勇2 小时前
Linux strings命令详解
linux·运维