Thursday, December 6, 2012

Some Basic Networking Commands : Linux/Windows

I this post i am gonna write about some basic Networking commands used in Windows/Linux that i found important.
  • Display Network configuration and interfaces
    1. windows : "ipconfig" or "ipconfig /all"
    2. Linux: "ifconfig" or "ifconfig interface-name"
  • Show all running Tasks/Applications
    1. windows : "tasklist
    2. Linux: "ps aux" or "top" (Top is used to show memory and CPU used by running process)
  • Kill a task
    1. windows : "taskkill -pid 4000" or "taskkill -im iexplore.exe" ( Here -im is for image name)
    2. Linux: "kill -9 pid"
  • Displays the active TCP connections and ports on which the computer is listening
    1. windows : "netstat -a"
    2. Linux: "netstat -an"
  • Diagnose the Domain Name System (DNS) : Resolves a hostname to IP address
    1. windows : "nslookup
    2. Linux: "dig"
  • Ping : tool used to test whether a particular host is reachable or not.
    1. windows/Linux IPv4 : "ping"
    2. Windows/Linux IPv6: "ping6 9901::1"
  • Path Ping : To see all the routers present in path to Destination
    1. windows : "pathping
    2. Linux: "tracepath"
  • Assign IP/Subnet to Linux interfaces
    1. Linux - IPv4 : "ifconfig eth0 netmask"
    2. or Linux - IPv4 : "ifconfig eth0"
    3. Linux - IPv6 : "ifconfig eth1 inet6 add 9901::2/64 "
  • Delete IP from Linux interfaces
    1. Linux - IPv4 : "ifconfig eth1 del netmask"
    2. Linux - IPv6 : "ifconfig eth1 inet6 del 9901::2/64"
  • Change MTU(Maximum Transmit Unit through an Interface) of Linux interfaces
    1. Linux : "ifconfig interface_name mtu value"
    2. Linux : "ifconfig eth1 mtu 1300"
  • Print routing tables
    1. windows : "netstat -r" or "route print"
    2. Linux- IPv4: "route -A inet" or "route -4" or "ip route"
    3. Linux -IPv6: "route -A inet6" or "route -6" or "ip -6 route"
    • Add/Delete static routes
      1. windows- IPv4 : "route add mask"
      2. Windows - IPv6 : "netsh interface ipv6 add route 9901::/64 "Local Area Connection" 2001::1"
      3. Linux-IP4: "route add -net netmask gw"
      4. Linux-IP4: "ip route add via"
      5. Linux-IP6: "route -A inet6 add 9901::/64 gw 2001:0db8:0:f101::1"
      6. Linux-IP6: "ip -6 route add 9901::/64 via 2001:0db8:0:f101::1"
    • Trace route : to diagnostic tool for displaying the route
      1. windows : "tracert"
      2. Linux: "traceroute"
    • Secure Shell :SSH is a network protocol for secure data communication and remote command execution
      1. SSH-IPv4 : "ssh username@IPv4_address" Ex: ssh root@ then it will ask you for password.
      2. SSH-IPv6: "ssh username@IPv6_address"  Ex : ssh username@9901::1.
    • Secure FTP : SFTP is a network protocol that provides file access, file transfer, and file management functionalities over any reliable data stream.
      1. SFTP-IPv4 : "sftp username@IPv4_address". Ex: sftp root@
      2. Linux: "sftp username@[IPv6_address]". Ex:  sftp username@[9901::15]
    • Secure Copy or SCP : Secure copy or SCP is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH) protocol.
      1. SCP Linux : scp  username@IP:/Dir/File_name /local_dir
      2. Ex:     scp  root@ .
      3. SCP windows : For windows you can use, WinSCP. Its a GUI based tool.


      1. difference of commands between windows and linux is very wel explained..gr8...

      2. awesome..its all are useful...great..
        Thanks a lot...

      3. hi i m shah nawaz

      4. Excellent stuff. Thanks heaps

      5. Excellent info... all related stuff at one glance... thanks for sharing!!!

      6. Excellent Material

      7. Informative blog useful for those who are not aware about run commands in windows and their functions ..I tried ipconfig/renew,ipconfig/release command to change my ip address ..Then i visited sites like to find my present network ip address ...

      8. I have read so many articles or reviews on the topic
        of the blogger lovers but this piece of writing is genuinely a good piece of writing, keep it up.
        IPv6 Training Course,6 Months Industrial Training,
        Industrial Training Services,Huawei Training Courses,6 Weeks Industrial Training