What does the 'inet' command show?

0701

The inet command itself is not a standalone command in Linux; however, it often appears in the context of network configuration commands, particularly when using ip addr show or ifconfig.

When you see inet in the output of these commands, it refers to the IPv4 address assigned to a network interface. Specifically, it shows:

  • The IPv4 address of the interface.
  • The subnet mask (often represented in CIDR notation).
  • The scope of the address (e.g., host, link, global).

For example, in the output of ip addr show, you might see a line like this:

inet 192.168.1.10/24 scope global eth0

This indicates that the interface eth0 has an IPv4 address of 192.168.1.10 with a subnet mask of 255.255.255.0 (or /24 in CIDR notation).

0 Comments

no data
Be the first to share your comment!