关键词搜索

全站搜索
×
密码登录在这里
×
注册会员

已有账号? 请点击

忘记密码

已有账号? 请点击

使用其他方式登录

linux手册

linux getent命令–查看记录

Linux getent命令用来查看系统的数据库中的相关记录。

即使这些数据库不是在本地,比如ldap或者nis中的数据库, 也可以使用getent察看。长选项的强制或可选参数对对应的短选项也是强制或可选的。

支持的数据库: ahosts,ahostsv4 ,ahostsv6, aliases ,ethers ,group, gshadow, hosts, netgroup, networks, passwd, protocols, rpc ,services, shadow,例如:getent protocols , getent services, getent rpc等。

语法格式:getent [参数]

常用参数:

-s 要使用的服务配置
-help 给出该系统求助列表
-usage 给出简要的用法信息
-V 打印程序版本号

参考实例

从hosts库中得到linux.com的IP信息:

[root@linuxcool ~]# getent hosts linuxcool.com
182.149.160.47  linux.com
200.181.57.217  linux.com
123.125.15.144  linux.com

从passwd库中得到账号tank信息:

[root@linuxcool ~]# getent passwd tank
tank:x:502:502::/home/tank:/bin/bash

输出getent命令简要用法列表:

[root@linuxcool ~]# getent -help
点击QQ咨询
开通会员
上传资源赚钱
返回顶部
×
  • 微信支付
  • 支付宝付款
扫码支付
微信扫码支付
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载