Find subnet mask on UNIX

htt‮//:sp‬www.lautturi.com
Find subnet mask on UNIX

To find the subnet mask of your network interface on a Unix-like system, you can use the ifconfig command with the name of your network interface.

For example, to display the subnet mask of the eth0 interface, you can use the following command:

ifconfig eth0

This will display the subnet mask of the eth0 interface, along with other information about the interface such as its IP address, MAC address, and the status of the interface.

The subnet mask is usually displayed in the form of a dotted decimal notation, such as "255.255.255.0".

You can also use the ip command to display the subnet mask of your network interface. For example:

ip addr show eth0

This will display the subnet mask of the eth0 interface, along with other information about the interface such as its IP address, MAC address, and the status of the interface.

You can find more information about the ifconfig and ip commands and their options in the ifconfig and ip documentation or by running the ifconfig --help and ip --help commands.

Created Time:2017-10-28 20:40:30  Author:lautturi