-
Notifications
You must be signed in to change notification settings - Fork 0
Linux Network Commands
$ifconfig
$ifconfig eth0
$ ifconfig eth0 netmask 255.255.255.0
$ ifup eth0
$ ifdown eth0
Hostname is to identify in a network. Execute hostname command to see the hostname of your box. You can set hostname permanently in /etc/sysconfig/network (requires reboot). $ hostname
Traceroute is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path.
$ traceroute
Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.
$ netstat -r
Dig (domain information groper) query DNS related information like A Record, CNAME, MX Record etc. This command mainly use to troubleshoot DNS related query.
$ dig www.uol.com.br
Nslookup command also use to find out DNS related query.
$ nslookup www.uol.com.br
Route command also shows and manipulate ip routing table. To see default routing table in Linux, type the following command.
$ route add default gw 192.168.0.1
ARP (Address Resolution Protocol) is useful to view / add the contents of the kernel’s ARP tables. $ arp -e