CN Network Commands
CN Network Commands
Theroy –
The following are few of the basic networking commands used in the
Linux operating system:
1. Ping command
Syntax:
ping [options] [destination]
Example:
ping -c 10 google.com
Syntax:
traceroute [options] host_Address [pathlength]
Example:
traceroute -4 google.com
→ Uses IPv4 address to find a path to destination “google.com”
3. Nslookup
Syntax:
nslookup [option] <domain_name>
Example:
→ It will output the name servers which are associated with the given
domain
i.e. google.com
4. Netstat command
Syntax:
netstat [option]
Example:
netstat -s
→ Lists the statistics for all available ports
5. Arp command
Syntax:
arp [options] [hostname]
Example:
arp -a
→ Shows all entries of mac Addresses of all connected devices.
6. Ip command
Syntax:
ip [ OPTIONS ] OBJECT { COMMAND | help }
Example:
ip address
7. Ifconfig command
Syntax:
ifconfig [...OPTIONS] [INTERFACE]
Example:
ifconfig -a
→ Displays all the interfaces available, even if they are down.
8. Dig command
Syntax:
dig [server] [name] [type]
Example:
dig atharvacoe.ac.in ANY
→ “ANY” option will query all the available DNS record types associated
with a domain. It will include all the available record types in the output.
Outputs:
1. Ping
2. Traceroute
3. Nslookup
4. Netstat
5. Arp
6. Ip
7. Ifconfig
8. dig
Conclusion –