Saturday, January 11, 2025
HomeProgrammingFind IP Address in Linux

Find IP Address in Linux

To find the IP address in Linux, you can use several commands in the terminal. One common method is using the ipcommand. Open the terminal and type:

bash

ip addr show

This displays all network interfaces and their details. Look for the inet value under your active interface (commonly eth0 for Ethernet or wlan0 for Wi-Fi). The number in the format x.x.x.x is your IP address.

See also  How do I format A date In JavaScript?

Alternatively, use the ifconfig command:

bash

ifconfig

This provides similar details, but it may need to be installed on some distributions. Another option is:

bash

hostname -I

This directly shows your IP address.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x