RHEL:接口配置文件的手册页

Modified on: Sat, 30 Jun 2018 10:06:00 +0800

如何获取man文件的ifcfg-$Interface页面?类似man 5 $Keyword,用于/etc/sysconfig/network-scripts/ifcfg-enp0s3。是否没有man页面?关键字是错误的吗?

RHEL:~# cat /etc/os-release | egrep "^NAME=|^VERSION="
NAME="Red Hat Enterprise Linux Server"
VERSION="7.0 (Maipo)"
RHEL:~# 
RHEL:~# 
RHEL:~# man --version
man 2.6.3
RHEL:~# 
RHEL:~# 
RHEL:~# man 5 ifcfg
No manual entry for ifcfg in section 5
RHEL:~# 
RHEL:~# 
RHEL:~# whatis ifcfg
ifcfg (8)            - simplistic script which replaces ifconfig IP managment
RHEL:~# 
RHEL:~# 
RHEL:~# man -k ifcfg
ifcfg (8)            - simplistic script which replaces ifconfig IP managment
RHEL:~# 
RHEL:~# 
RHEL:~# file /etc/sysconfig/network-scripts/ifcfg-enp0s3 
/etc/sysconfig/network-scripts/ifcfg-enp0s3: ASCII text
RHEL:~# 

在SUSE上正常工作:

SUSE:~# cat /etc/os-release | egrep "^NAME=|^VERSION="
NAME=openSUSE
VERSION="13.1 (Bottle)"
SUSE:~# 
SUSE:~# 
SUSE:~# man --version
man 2.6.3
SUSE:~# 
SUSE:~# 
SUSE:~# whatis ifcfg
ifcfg (5)            - common elements of network interface configuration
SUSE:~# SUSE:~# man 5 ifcfg
SUSE:~# 
SUSE:~# 
SUSE:~# man -k ifcfg
ifcfg (5)            - common elements of network interface configuration
ifcfg-bonding (5)    - interface bonding configuration
ifcfg-bridge (5)     - ethernet bridge interface configuration
ifcfg-tunnel (5)     - network tunnel interface configuration
ifcfg-vlan (5)       - virtual LAN interface configuration
ifcfg-wireless (5)   - wireless LAN network interface configuration
SUSE:~# 
SUSE:~# 
SUSE:~# file /etc/sysconfig/network/ifcfg-enp0s3 
/etc/sysconfig/network/ifcfg-enp0s3: ASCII text
SUSE:~# 

最佳答案

RHEL中的接口配置文件似乎没有联机帮助页,但文档可以在以下位置找到:

/usr/share/doc/initscripts-*/sysconfig.txt

查找描述文件/etc/sysconfig/network/etc/sysconfig/network-scripts/ifcfg-<interface-name>

同样在您的示例中,命令whatis ifcfg返回

/usr/share/doc/initscripts-*/sysconfig.txt

正如您所看到的那样,它引用了“第8节” - 管理工具和命令 - 您可以打开手册页:

ifcfg (8) - simplistic script which replaces ifconfig IP managment

但请注意,这不是描述sysconfig文件ifcfg-<interface-name>的联机帮助页。相反,它是命令/sbin/ifcfg的联机帮助页,可能不是您想要的。

作者:,MLu

相关问答

添加新评论