ping
The ping command sends echo requests to the host you specify on the command line, and lists the responses received their round trip time. ping will send echo request indefinitely until you stop by ctrl+c (SIGINT). You can also add -c option to send a fixed number of requests.
telnet
The telnet command is used for interactive communication with another host using the TELNET protocol. It begins in command mode, where it prints a telnet prompt (“telnet> “). If telnet is invoked with a host argument, it performs an open command implicitly; see the description below.
netstat
Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections and few other details.
tcpdump
This will capture packets off a network interface and interprets them for you. It understands all basic internet protocols, and can be used to save entire packets for later inspection.
# tcpdump port 22
# tcpdump dst 192.168.65.133 and tcp -vv
hostname
Tells the user the host name of the computer they are logged into.
traceroute
traceroute will show the route of a packet. It attempts to list the series of hosts through which your packets travel on their way to a given destination.
# traceroute 192.168.22.133
nmap
It is a poweful network exploration tool and security scanner, nmap is a very advanced network tool used to query machines (local or remote) as to whether they are up and what ports are open on these machines.
iftop
iftop – display bandwidth usage on an interface by host
ifconfig
ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed.
If no arguments are given, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single ‘-a’ argument is given, it displays the status of all interfaces, even those that are down. Otherwise, it configures an interface.
iwconfig
iwconfig is similar to ifconfig , but is dedicated to the wireless interfaces.
ifup/ifdown/ifquery
usage examples
$ ifup eth0
$ ifquery eth0
host
dig
The “domain information groper” tool. More advanced then host. If you give a hostname as an argument to output information about that host, including it’s IP address, hostname and various other information.
To find the host name for a given IP address (ie a reverse lookup), use dig with the `-x’ option. dig takes a huge number of options (at the point of being too many), refer to the manual page for more information.
whois
whois is used to look up the contact information from the “whois” databases, the servers are only likely to hold major sites.
wget
Simple usage example: wget url_for_file
This would simply get a file from a site.
wget has many more options refer to the examples section of the manual page, this tool is very well documented.
curl
To access the full manual (which is huge) for this command type:
curl -M
For general usage you can use it like wget. You can also login using a user name by using the -u option and typing your username and password like this:
curl -u username:password http://www.placetodownload/file
Remote Login
ssh
ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections, arbitrary TCP ports and UNIX-domain sockets can also be forwarded over the secure channel.