Free IP Lookup Service



Linux network commands


Linux offers several powerful tools to manage network connections. They are often similar to the standard UNIX network commands.
We will list some of the most common here.

Open command line and type the command without quotes, and hit enter. Note that to make any changes you need to be logged in as the root user.

IP Configuration


Display Current Config for all NIC's


'ifconfig'

Display Current Config for eth0

(eth0 is the first installed network card, eth1 is the second and so on)
'ifconfig eth0'

Assign IP


'ifconfig eth0 *ip*' where *ip* should be replaced with desired IP address.

Assign multiple IP's


'ifconfig eth0:0 *ip*' where *ip* should be replaced with desired IP address.

Assign second IP


'ifconfig eth0:1 *ip*' where *ip* should be replaced with desired IP address.

Disable network card


'ifconfig eth0 down'




Enable network card


'ifconfig eth0 up'

Assign IP/Subnet


'ifconfig eth0 *ip* netmask 255.255.255.0' where *ip* should be replaced with desired IP address.

Assign Default Gateway


'route add default gw 192.168.1.1'

Network analysis


Trace Route


'traceroute *url or host*'

Trace Path


'tracepath *url or host*'

DNS Test


'host *url*'

Detailed DNS Test


'dig *url*'

Reverse Lookup


'host *ip*'

Advanced Reverse Lookup


'dig -x *ip*'

Ping a host (to test connection)


'ping -c 3 *host or ip*'

View current routing table


'route' or 'route -n'

View arp cache


'arp' or 'arp -n'

Read similar articles

Download IP Checker