IPGu.Net - Thailand's Fastest IP Address Lookup Site.

Linux IP Command Lines

Linux - General Command Lines
Note: You MUST be at the ROOT user to make/save any changes. Linux users, your distribution will determine the location of your network config file which will need to be updated and saved in order for the changes to remain in effect after rebooting. Network cards are referred to as eth0, eth1, eth2, etc based on their position on the PCI bus.
Display Current Config for all NIC's: ifconfig

Display Current Config for eth0: ifconfig eth0

Assign IP: ifconfig eth0

Assign IP/Subnet: ifconfig eth0 netmask

Assign Default Gateway: route add default gw

Assign multiple IP's: ifconfig eth0:0

Assign second IP: ifconfig eth0:1

Disable network card: ifconfig eth0 down

Enable network card: ifconfig eth0 up
View current routing table: route "or" route -n

View arp cache: arp "or" arp -n

Ping: ping -c 3

Trace Route: traceroute www.IPGu.net

Trace Path: tracepath www.IPGu.net

DNS Test: host www.IPGu.net

Advanced DNS Test: dig www.IPGu.net

Reverse Lookup: host

Advanced Reverse Lookup: dig -x

*Special thanks to Gergely for the Linux commands!

© 2008 ipgu.net