The Linux getent command

Source: Internet
Author: User

I saw the getent command on a video yesterday, which can be used to view related records in the system's database, for example:

[Email protected]:~$ getent hosts GUOLIANGC
10.10.3.1 GUOLIANGC

[Email protected]:~$ getent passwd MySQL
Mysql:x:1003:1003::/home/mysql:/bin/sh






[email& nbsp;protected]:~$ getent--help
Usage: getent [Options ...] database [key ...]
Get entries from administrative database.

 -S,--service=config       the service configuration to use
 -?,--help                  give the system Help list
      --usage                 Give a brief usage information
 -V,--version               Print Program version number the

Long option is mandatory or optional for a short option that corresponds to a mandatory or optional parameter.

Supported databases:
ahosts ahostsv4 ahostsv6 aliases ethers group Gshadow hosts Netgroup
Networks passwd protocols RPC s Ervices Shadow

for the bug reporting instructions, please see:
.


Where the shadow database can only be viewed by the root user.


This article from the "Linux-related technology" blog, declined to reprint!

The Linux getent command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.