How to check ip address in linux

Release: 2019-12-25 14:51:27
Original
71055 people have browsed it

How to check ip address in linux

IP addresses can be divided into two categories, public and internal. A public IP is a unique IP address that is accessible from the Internet. Internal IP addresses are reserved for use within your private network and are not directly exposed to the Internet. Furthermore, there are two types of IP addresses, IP version 4(IPv4) and IP version 6(IPv6).

In Linux you can determine the system's internal IP address by querying the network stack using commands, For example: ip, ifconfig or hostname.

In Linux, the standard command for displaying and configuring network interfaces is ip.

To display a list of all network interfaces and associated IP addresses, type the following command:

ip addr

The output will look like this. The internal IP address is highlighted.

How to check ip address in linux

You can also display the internal IP address using the following command:

hostname -I

ifconfig

How to check ip address in linux

Linux video tutorial recommendation: linux video tutorial

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!