Home >Operation and Maintenance >Linux Operation and Maintenance >What is the command to check ip address in linux

What is the command to check ip address in linux

王林
王林Original
2019-12-25 15:17:4115372browse

What is the command to check ip address in linux

First of all, the more commonly used command is ip a s. Execute ip a s in the command line to output all network card information, including virtual network cards

What is the command to check ip address in linux

If there are many network cards, you have to judge based on experience. Which one is the network card IP you want? I have four network cards here, usually en0, and here I am em4. Check the inet inside and it will be the ip address

Recommended free learning video tutorials: linux video tutorial

What is the command to check ip address in linux

In fact, the ip address of each network card is the ip of its own machine , only IPs in the same network segment can access each other. The ip a s command is an abbreviation, the full name is ip addr show, using this is equivalent to ip a s

What is the command to check ip address in linux

If the previous command After executing, it prompts that the command cannot be found. Don't worry. There are many commands below to check the IP. Here, this is to execute /sbin/ifconfig, and the IP can be output.

What is the command to check ip address in linux

The output content is similar to the previous command, but this network card has a blank line to isolate it.

What is the command to check ip address in linux

This command can actually be abbreviated. Ifconfig can be executed directly because it is placed in sbin Directory, you don’t need to enter the full path

What is the command to check ip address in linux

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of What is the command to check ip address in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn