How to Find IP and Gateway in Linux

Windows Articles

How to access System in Windows 10

Perhaps the title of this post is misleading. In previous versions of Windows, it was enough to enter the Control Panel and from there,...

Microsoft reduces the fragmentation of Windows 10

Windows 10 20H2 has been released as a minor operating system update. As a result, it has managed to reduce platform errors. In addition,...

How to install Nginx and PHP on FreeBSD?

Hello, friends. FreeBSD is a secure system even more than Linux, that's why it's used as the main server. And a server has to...

How to enable local port forwarding using Ubuntu 20.04 and ssh

SSH, a very popular tool found almost with every IT guy. Commonly, when we talk about the insecure network for data, ssh is the...

How to use CHKDSK in Windows 10

Hello! It is very important to ensure the integrity of the hard disk in the computer. Since it is an essential element for the...
Muhammad Nabeel
Muhammad Nabeel
Network and System Administrator

What is IP Address?

An Internet Protocol address (IP address) is a unique identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication. The IP address space is managed globally by the Internet Assigned Numbers Authority (IANA).

Their are two versions of IP address, IP Version 4 (IPv4) it uses just 32 bits and IP Version 6 (IPv6) uses 128 bits.

What is Gateway?

A gateway is the network node using the internet protocol suite that serves as the forwarding host to other networks. It allows one computer to send information to a computer in another network or the internet.

In this article you will learn that how to see server IP address and its default gateway.

How to find IP Address in Linux?

Find Private IP address:

Use one of following commands to check your machine Private IP address.

ip a

OR

ifconfig

So, In result you will get your private IP address. examples are in above images. But what if you want want to see your Public IP address

Find Public IP Address:

So, If you want want to see your Public IP address use following command.

curl ifconfig.me

How to Find Gateway in Linux?

Above you have read about Gateway address, now we will discuss that how we can see our server’s gateway.
to do so, simple run one of following commands and you will get result on your screen.

ip route

OR

ip route | grep default

OR

route -n

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to access System in Windows 10

Perhaps the title of this post is misleading. In previous versions of Windows, it was enough to enter the Control Panel and from there,...

Microsoft reduces the fragmentation of Windows 10

Windows 10 20H2 has been released as a minor operating system update. As a result, it has managed to reduce platform errors. In addition,...

How to install Nginx and PHP on FreeBSD?

Hello, friends. FreeBSD is a secure system even more than Linux, that's why it's used as the main server. And a server has to...

How to enable local port forwarding using Ubuntu 20.04 and ssh

SSH, a very popular tool found almost with every IT guy. Commonly, when we talk about the insecure network for data, ssh is the...

How to use CHKDSK in Windows 10

Hello! It is very important to ensure the integrity of the hard disk in the computer. Since it is an essential element for the...
x