1.sysctl指令
用来修改正在运行的内核参数,可以修改的参数都保存在/proc/sys/目录中,修改会立即生效。
1)显示所有的内核参数名字和值
[root@dsrw ~]# sysctl -a
abi.vsyscall32 = 1
crypto.fips_enabled = 0
debug.exception-trace = 1
debug.kprobes-optimization = 1
dev.cdrom.autoclose = 1
2)读一个指定的变量
[root@dsrw ~]# sysctl vm.zone_reclaim_mode
vm.zone_reclaim_mode = 0
3)配置sysctl
[root@dsrw ~]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
2.lsmod命令用于显示已载入系统的模块
[root@dsrw ~]# lsmod
Module Size Used by
binfmt_misc 20480 1
bonding 184320 0
uinput 20480 1
3. uname命令用于显示系统信息
[root@dsrw ~]# uname -a
Linux dsrw.com 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@dsrw ~]# uname -m
x86_64
[root@dsrw ~]# uname -n
dsrw.com
[root@dsrw ~]# uname -r
4.18.0-80.el8.x86_64
[root@dsrw ~]# uname -s
Linux
[root@dsrw ~]# uname -v
#1 SMP Wed Mar 13 12:02:46 UTC 2019
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容