Managing swap space in Ubuntu

Swap space is the area in secondary storage devices which temporarily holds memory pages that are inactive. Swap space is used when the system needs physical memory for active processes and there is insufficient unused physical memory available. In such a case inactive pages in physical memory are moved to the swap space therefore freeing up that physical memory for other uses.

In Ubuntu, the user is prompted to create a swap partition during OS installation. But have you ever felt that the space you have allocated is insufficient?
If yes, it is possible to create a new swap file and add it to the running system so that the total swap space will be increased.

I added 512 MiB of additional swap space to my system, creating a new swap file named NewSwap512.swap in the /mnt directory.

1. Creating a 512 MiB swap file and setting the permissions.
sudo fallocate -l 512m /mnt/NewSwap512.swap
sudo chmod 600 /mnt/NewSwap512.swap
sudo mkswap /mnt/NewSwap512.swap

2. Add it to the running system
sudo swapon /mnt/NewSwap512.swap

That will do, but this additional swap area is temporary
and will be lost after reboot.
To make it permanent, edit /etc/fstab
sudo gedit /etc/fstab
add this line to the end of the file
/mnt/NewSwap512.swap none swap sw 0 0


A trip to Adyanpara

Adyanpara Fall is a cascading waterfall, located few kilometers away from Nilambur town in Kerala, India. Nilambur homes the world’s oldest teak plantations (known as Conolly plot, named after H.V Conolly) and the only Teak Museum in India. But what attracts me more is the natural scenery near the fall.

Listed as one of the major tourist attractions in Nilambur; It is more convenient to visit the place during dry seasons so that the river is comparatively calm and one could enjoy playing in water and climbing the boulders.

It was during end-semester holidays. My friends arrived at the Nilambur railway station early in the morning, and I was waiting there to pick them up. We traveled for about forty-five minutes through the narrow road leading to the locale.

The trip was really exciting, and a bit adventurous too…

MAC spoofing in Linux

Media Access Control address (MAC address) is a unique identifier assigned to network adapters or network interface cards.

Usually, they are pre-written by the manufacturer and encodes the manufacturer’s registered identification number. Although MAC address is intended to be a permanent and unique identification code, it is possible to change the MAC address of most of the network hardwares that are available today. This process is known as MAC Spoofing.

In Linux systems, it is possible to set a temporary MAC address for the hardware with 3 easy steps. The address set by this method will be changed to the original code after rebooting the system.

1. Stop the network card.
$ sudo ifconfig eth0 down
here eth0 is the ethernet network controller.

2. Set a new MAC address.
$ sudo ifconfig eth0 hw ether @@:@@:@@:@@:@@:@@
replace the ‘@’ symbols with new MAC address.

3. Start the network card again.
$ sudo ifconfig eth0 up

Type ifconfig to display network adapter properties.