三种方法查看Linux ip地址

What is Ip address?

An IP address is the identifier that enables our device to send or receive data packets across the internet. It holds information related to our location and therefore making devices available for two-way communication.

Most internet service providers still use IPv4. It’s based on 32 binary bits, consists of four numbers from 0 to 255, and is separated by dots. For example, 103.86.98.1.

Check Ip address with ip addr command

ip addr – Show information for all addresses
ip addr show dev em1 – Display information only for device em1

Get Ip address with ifconfig command

The “ifconfig” command is another most common command used to view IP related information.
This command will list all the network interfaces along with their details which include interface status, IP address, MTU size, etc.

Find Ip address with ip route command

The “ip route” command can also be used to find the IP address of a system. In order to find the IP address of a system, use the command as follows:

$ ip route

This command will print out the IP address of our system along with other network details.

how to check ip address in Linux

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值