We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getent命令来自于英文词组“get entries”的缩写,其功能是用于查看系统数据库中的记录信息。即便这些数据库不是本地的,类似于LDAP或者NIS也可以使用getent命令进行查看。
语法格式:getent [参数]
常用参数:
-s: 要使用的服务配置 -help: 给出该系统求助列表 -usage: 给出简要的用法信息 -V: 打印程序版本号
参考实例
查看本地的主机文件(/etc/hosts)中包含的指定域名信息: [root@linuxcool ~]# getent hosts linuxcool.com 182.149.160.47 linuxcool.com
查看本地的密码文件(/etc/passwd)中包含的指定用户信息: [root@linuxcool ~]# getent passwd linuxprobe linuxprobe:x:1000:1000:linuxprobe:/home/linuxprobe:/bin/bash
The text was updated successfully, but these errors were encountered:
feat: add getent.md #483
020b2bb
[v1.14.0] feat: add getent.md #483 020b2bb
24a9467
@QuTaoa 已经添加,欢迎补充
Sorry, something went wrong.
No branches or pull requests
getent命令来自于英文词组“get entries”的缩写,其功能是用于查看系统数据库中的记录信息。即便这些数据库不是本地的,类似于LDAP或者NIS也可以使用getent命令进行查看。
语法格式:getent [参数]
常用参数:
-s: 要使用的服务配置
-help: 给出该系统求助列表
-usage: 给出简要的用法信息
-V: 打印程序版本号
参考实例
查看本地的主机文件(/etc/hosts)中包含的指定域名信息:
[root@linuxcool ~]# getent hosts linuxcool.com
182.149.160.47 linuxcool.com
查看本地的密码文件(/etc/passwd)中包含的指定用户信息:
[root@linuxcool ~]# getent passwd linuxprobe
linuxprobe:x:1000:1000:linuxprobe:/home/linuxprobe:/bin/bash
The text was updated successfully, but these errors were encountered: