How To Find Subnet Mask From Ip Address In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To find the subnet mask from an IP address in Linux, use the ‘ifconfig’ command. For example, if your IP address is 192.168.1.2, you can use the following command to view your subnet mask:
sudo ifconfig eth0 | grep netmask
The output should display the subnet mask in CIDR notation (e.g. /24).