Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the getent command of linux to view records

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the use of linux getent command to view records, the article is very detailed, has a certain reference value, interested friends must read it!

The Linux getent command is used to view the relevant records in the database of the system.

Even if these databases are not local, such as those in ldap or nis, you can use getent to view them. The mandatory or optional parameters of the long option are also mandatory or optional for the corresponding short option.

Supported databases: ahosts,ahostsv4, ahostsv6, aliases, ethers, group, gshadow, hosts, netgroup, networks, passwd, protocols, rpc, services, shadow, such as getent protocols, getent services, getent rpc, etc.

Syntax format: getent [parameters]

Common parameters:

Reference example

Get the linux.com IP information from the hosts library:

[root@linuxcool ~] # getent hosts linuxcool.com182.149.160.47 linux.com200.181.57.217 linux.com123.125.15.144 linux.com

Get the account tank information from the passwd library:

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

Output a brief usage list of getent commands:

[root@linuxcool ~] # getent-help above is to use linux's getent command to view all the contents of the record, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report