What is a socket in networking?


socket is one endpoint of a two-way communication link between two programs running on the network. 
socket is a combination of the port number and the IP address, so that the TCP/UDP layer can identify the application that data is destined to be sent to. 


Take an example of an apartment building ( World Famous Analogy)


  1. The street address of the building is the IP Address
  2. The specific apartment number in that building is the port number (port number tells the type of data transmission - TCP or UDP)
  3. The door of the apartment is the Socket (TCP + Socket)



So, the postman (TCP Layer) needs all the values
- Building Address (IP Address)
- Apartment Number (Port Number)
- Door (Socket)

so that the letter in postman's hand (data) can arrive at the correct destination (application).









What's a Memory Leak?


  • A memory leak is like a virtual oil leak in your computer. 
  • It will slowly drains the available memory, reducing the amount of free memory the system can use. 
  • Most memory leaks are caused by a program that unintentionally uses up increasing amounts of memory while it is running. 
  • This is typically a gradual process that gets worse as the program remains open. If the leak is bad enough, it can cause the program to crash or even make the whole computer freeze.



Reference - http://techterms.com/definition/memoryleak





How to do persistent mounting of a partition over a reboot?

Sometimes, we manually mount a folder but if we do a reboot, it doesn't stay there. 
So, How to mount a partition so that it remains persistent over reboot ?

mount --bind /source/folder destination/folder

Type the following in the /etc/fstab file

source/folder                destination/folder                 bind                 0 0


Then, if you do a reboot also, the mounted folder will stay as it is.