Linux Archive

Zombie vs Orphan process


Temporary failure resolving – sudo apt-get update in ubuntu

If you are trying to update ubuntu respository and getting error: W: Failed to fetch  Temporary failure resolving ‘’ just check the DNS. Set the Google DNS ( in /etc/resolvconf/resolv.conf.d/base [crayon-5ce4a47fa6a02165533841/] then [crayon-5ce4a47fa6a13174050605/] After this procedure, I was able to resolve hostnames and [crayon-5ce4a47fa6a1c991701101/]

Bash script to get average time from logs

What if we have logs of a server like apache or syslog server and we want to get average time from timestamps of all rows. How can we do it? Basically, we need to filter timestamp (column-8) from each row and just find its average. Below is the screenshot of the problem. (click on the

Kill multiple pid with same process

Sometime back I caught up in a situation where I need to kill multiple pid invoked from same process. So, all process have same name Assume, process invoked for “vim” editor. If I have 20 “vim” process running and I want to kill all of them, what’s the best way to do it? #There are multiple ways:

TCPDUMP examples

Tcpdump is a command-line based packet capture tool like wireshark which is GUI. Capture all traffic on ethernet interface: $tcpdump –i eth0 2. Filter by host IP-address: $tcpdump host 3. Filter traffic by source and destination ip-address: TCPDUMP filter by source and destination:             $tcpdump src        

CURL command examples

CURL is a command line tool used to transfer and retrieve data in web. Let’s have a look at few of the useful options while debugging web issues. Basic syntax $CURL <Options> <hostname or ip-address> Options are optional. Hostname and IP-address can be interchanged depends upon the options we are selecting. First example is to use