Category Archives: Technology

Setting up WordPress on Debian 9.3 x64 on a Virtual Machine on Windows 10

In this article I am documenting the exact steps that one needs to host a wordpress based site on a Debian based virtual machine (VM). I choose debian since that’s one of the preferred distro based on it’s stability and smaller footprint on resources compared to Ubuntu. But you may very well choose Ubuntu, only some steps in below documentation would differ.

This article deals with following technologies:

  1. Windows 10: The host operating system
  2. Oracle VirtualBox: The Virtual Machine software
  3. Debian 9.3 x64: The distro which we will install on the VM
  4. nginx: The web server
  5. mariadb: MySQL database solutions
  6. php: The package which installs on Debian automatically as a dependency
  7. phpMyAdmin: Administration tool for MariaDB

Continue reading Setting up WordPress on Debian 9.3 x64 on a Virtual Machine on Windows 10

Resurrecting Soft Bricked Moto E

So I had a Moto E that was showing weird issues. Sometimes when it’s rebooted it stucks in bootloop and fails to finish the boot sequence. The home screen just doesn’t appear. I manage to flash a fresh ROM on it and after which it starts to work. I haven’t been able to identify the problem yet, but the turnaround is working good as of now. So I just want to document the process of fixing the soft bricked Moto E:

Please note that this is just a documentation of the process I followed to fix my Moto E. This is by no means an accurate or official guide to fix your Moto E. If you do mess up your phone trying to follow this documentation, you can't blame me.

The simple procedure for a fresh Moto E is to first unlock the bootloader of Moto E. Which is a simple one time process which includes using the following command in fastboot mode: fastboot oem get_unlock_data. The unlock is complete when you enter a code on Motorola website and they give you a return string to unlock it. The guide is here.

Once the phone is unlocked its time to flash a custom recovery. This is done by downloading the TWRP recovery for Moto E here:

And then booting the phone in fastboot mode and sending following command:

fastboot flash recovery moto_e_twrp2.7.0.0_v1.2.img

Once the recovery is flashed you can reboot in recovery mode manually or by following command:

fastboot reboot

From recovery mode you can do all sorts of things like clearing out the cache (which sometimes fixes issues), and going into adb sideload mode. From this sideload mode, you can send sideload commands which can be used to install a custom ROM. The custom ROM for Moto E can be downloaded from below link: (The one which worked for me was: Retail Dual-SIM (Asia | World) 5.1 ROM (Optimized) v1.1 (287mb) Deodexed).

This ROM can be sideloaded by going into the sideload mode and sending following command:

adb sideload "I:\Moto E\"

After the above command, it will take some time and progress can be viewed on phone. Once that’s done you can reboot the device and the phone should start. First run takes a lot of times since it “optimizes” the app etc.

This ends the procedure. If you want to recreate all partitions from scratch, you may try to follow the following guide of flashing the stock firmware:

The above guide tells to download the stock firmware from following location:

(I choose XT1022_CONDOR_RETAILDSDS_5.1_LPCS23.13-34.8-3_cid7 (Newer Build))

To flash the stock firmware the above guide says to follow the below series of commands:

fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot.exe flash system system.img_sparsechunk.0
fastboot.exe flash system system.img_sparsechunk.1
fastboot.exe flash system system.img_sparsechunk.2
fastboot.exe flash system system.img_sparsechunk.3
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1 
fastboot erase modemst2 
fastboot flash fsg fsg.mbn
fastboot erase cache 
fastboot erase userdata 
fastboot reboot

I had to still try to flash the custom ROM instead of stock firmware to get my Moto E to successfully boot.

Commands to Analyze Space through Terminal

This article lists a few ways to analyze the usage space of the hard disk through Terminal.

Space occupied by all folder sorted ascending order:
sudo du -h * | sort -h

The command ‘du’ is used in terminal which stands for disk usage. But the command alone gives listing of all files along with their size. The above command sorts the list, so that the highest space folder appears in bottom of the list. SUDO added since if you want it to run in root folder, normal command won’t have access to system folders.

Space on disk:
df -h

Above command is not path sensitive, which means you can run it from anywhere and also don’t require sudo.

Disk space usage per user:
sudo find . -printf "%u %s\n" | awk '{user[$1]+=$2}; END{ for( i in user) print i " " user[i]}'

Above script (combination of commands) prints disk usage per user and is not path sensitive. The script uses find and awk (extraction command) to give a list of users along with the space they are consuming in bytes.

Viewing first top directories taking space
du --max-depth=1 2> /dev/null | sort -n -r | head -n20

The above command would list top few directories along with their size, sorted in descending order.

Third Party Utility:

On debian, install ncdu by following command:

sudo apt-get install ncdu -s

Once install, you can use the utility ncdu to easily see the size of various folders through a friendly user interface right within Terminal. Here’s the ncdu manual:
If above command don’t install ncdu try forcing the install by following command:

sudo apt-get install -f -y ncdu

With above command you can pin point the folder which is taking up space in little time. Also note that the sometimes you need to go deeper by using the command, sudo su, to view space of files taken up by say, /var directory.

Which Instant Messenger is best for me?

With all the advances that have happened in the world of Internet, one thing is at the core of it. That is Instant Communication. And from the ages of Internet Chat Relays (IRC) to WhatsApp and everything in between is playing a pivotal role in connecting people from all corners of the globe. And if you are confused as to what Instant Messenger is right for you, here is a flowchart that lets you decide between few of them.


WhatsApp: Everyone uses it since everyone else uses it. But things such as dependency on mobile even if you want to chat on browser makes it a very poorly developed IM.

IRC (Internet Chat Relay): It’s the most powerful IM that the netizens have ever used. You can chat privately, in rooms, on PC, on your phone, use bots, leave offline messages.. really the only limit is your imagination and skills to make more functionality.

Steam: Steam being the most popular client for gaming provides a client for both Windows, Linux and Android. So if you are a gamer you would tend to use it much extensively.

Telegram: It’s currently the most versatile IM as of now. With features such as true cross platform (you can run it on command line!), ability to share self expiring secret messages, cloud storage (so that you don’t loose your chat history) and with the introduction of bots, I am in love with this IM. Also the fact that you don’t need to share your mobile number like WhatsApp makes it perfect for privacy conscious users.

So which IM you use the most and what would be your choice, if you don’t have to come under peer pressure to choose more popular Instant Messenger?

Steps to add a WordPress Site to an existing VPS

I use to have a hard time configuring a new site under a common VPS. So I decided to document the steps for easy reference in future.
Following are the steps to add a new site “” under a new user account “username” on your Linux VPS. This is to note that this works if you have the following web service solution stack (LAMP):

Linux OS : Debian
Web server: Nginx (Not Apache)
Database: MySQL
Application Programming Language: PHP

So here we go:

1. Buy the domain. Call it

2. Set the nameserver of the domain to point to the IP address of your VPS under ‘A’ record which stands for ‘Address’. For reference, there are other kinds of record like ‘CNAME’ and ‘MX’, but you don’t need to set them at this point.

3. Create a new user on VPS by command by following command.

sudo adduser username

This command also creates a new home directory for the user.

Continue reading Steps to add a WordPress Site to an existing VPS

Shopping for and Assembling a new desktop PC

What’s a guitarist without his guitar? What’s a painter without his colours? What’s a sailor without a boat? What’s an IT professional without a desktop PC? Answer is common,  “nothing much!”. Hence when one of my friend finally decided to get a PC assembled I was very happy for him. I thought to help him out before other priorities gets hold of him and he changes his mind.

Before, he use to work either on his age old Celeron laptop or on my computer. He use to play games and watch movies on weekends with me. But now that he finally decided to get his own PC, I had a reason to get my geeky hands dirty in assembling a new PC. There’s some kind of charm in shopping for PC components and then putting them together in one coherent piece so that we can then appreciate the modern advancement, human beings now take for granted.

The Research:

I started my research by studying many of the rig suggestions by fellow members on digit forum and also the suggestions put up in digit magazine. After analyzing my friend’s requirements and the suggestions on forum we decided to go with following components:



Monitor AOC 21.5 inch LED Backlit LCD – i2269Vwm Monitor / I2279VWHE / i2267Fwh
LG 21.5 inch LED Backlit LCD – 22MP56HQ Monitor
Processor Intel 3.4 GHz LGA 1150 i3 4130
Intel 3.5 GHz LGA 1150 i3-4150 (BX80646I34150)
Motherboard MSI B85M-G43 Motherboard
Gigabyte GA-B85-D3H Motherboard
HDD WD Blue WD10EZEX 1 TB Internal Hard Drive
RAM Corsair Vengeance DDR3 4 GB (1 x 4 GB) PC DRAM (CMZ4GX3M1A1600C9)
Corsair Vengeance DDR3 8 GB (1 x 8 GB) PC DRAM (CMZ8GX3M1A1600C10)
Cabinet Antec VSK 4000B U3 New Solution Series Cabinet
PSU Antec VP450P I 450 Watts PSU
Optical Drive Samsung DVD Combo
Keyboard Logitech MK200 USB Standard Keyboard
Router TP-LINK TL-WR841N

As can be noticed, some of the components had two or more choices in them, arranged by priority. After spending considerable amount of time in researching the prices (in offline and online markets) we finally decided to go to “Nehru Place” to see if we can get good deals in the biggest computer hardware market of Asia.

Continue reading Shopping for and Assembling a new desktop PC

Upgrading to Windows 10, the Microsoft’s Comeback

Something Happened.. Classic Microsoft
Yup. That’s what happens, when something happens. Classic Microsoft

Its been a few days that Windows 10 started rolling out to general public. Even people who never saw past XP seemed to be excited about the new Windows 10.

Windows 8 wasn’t a soaring success even for the fans of Windows. Though its predecessor Windows 7 was a leap ahead from the good old XP, the tile interfaced Win 8 proved to be too much of a change. Start Menu had disappeared. It took the users by storm and Windows 8 was rejected by almost everyone, including myself. That’s why Windows 10 is so important for Microsoft. And maybe that’s why Microsoft decided to roll out a free upgrade for anyone who have a genuine license of Win 7 or Win 8.1.

Now people, all over the Internet are exploding with enough queries and concerns to overwhelm Microsoft. People are perplexed, furious and amazed with their own experience of upgrading. While everyone is jumping into the bandwagon of the latest operating system, failed downloads and bugs are putting many users off.

It all began on 29th July 2015. People who had registered for the update got a prompt that Windows 10 is now available and that they can install it after Windows finishes downloading the update files. I got a prompt too and I allowed the update to download.

Windows 10 downloading
Windows 10 downloading

Continue reading Upgrading to Windows 10, the Microsoft’s Comeback

YU Yuphoria Review

I got the opportunity to get my hands on a new YU Yuphoria phone last week. Following are my observations and review first hand.

YU Yuphoria released in the May 2015 as a successor to the phone Yu Yureka which was released in Jan 2015 by Micromax. YU Yureka was the first phone released under the YU tag. At the price point of Rs 8,999, Yureka provided many features to be found in only high end phones. Yuphoria, released after a few months is kind of a down scaled version of the Yureka but have its own strengths to boast on.


YU Yuphoria
YU Yuphoria

As a owner of Moto X (1st gen), the specs of Yuphoria baffled me initially. Yuphoria had similar specs as that of Moto X 1s gen but cost only Rs 6,999. That’s 3.5 times less price than that of Moto X 1st gen with similar features. Lets see the specs at a glance.

Yuphoria is a 4G phone with 5 inch screen size, have a layer of Gorilla glass 3 and sports a pixel density of 294 ppi with its 720p resolution. It’s powered with Snapdragon 410, Quad-core 1.2 GHz Cortex-A53 chipset which contains graphics capability of Adreno 306. Snapdragon is Qualcomm’s first 64 bit SOC. In terms of storage it comes with an internal memory of 16 GB (of course less for actual use) but is expandable to 32 GB. The phone contains 2 gigs of RAM enough to never let you go out of memory when playing high end games (for a couple of years at least).

Yuphoria Back
Yuphoria Back

It’s 8 mp primary camera have autofocus, flash and can shoot up to 1080p video. It can snap upto 3264 x 2448 pixels in image resolution. The front cam is 5 mp and seems impressive. The phone is supplied power through a 2230 mAh Li-Ion battery, which boasts of upto 160 hr of standby time on 3G, and 7 hrs of talktime. Continue reading YU Yuphoria Review

Auto Mounting Drives in Ubuntu

If you are using Ubuntu in dual mode with Windows you must be having a few partition that are NTFS. By default these NTFS drives are not auto mounted. So while you have the partitions, you won’t be able to access them if you don’t mount it.

As you already may know that in Ubuntu (and Linux in general) there are no drives. Combine it with the fact that the root directory starts from a forward slash (/). Every drive in Linux is ‘mounted‘. So when you insert a DVD disk the content of the disk may be mounted to a directory /media/username/DvdLabel. Here DvdLabel is the name of the mounted directory which was taken from the label of the disk.

Similarly if you have a partition with the label, say, Documents when you click the Documents partition, it is then that the Documents partition (or drive) is mounted to /media/Documents.

By default Ubuntu doesn’t mount the partitions when it starts. You have to click the partition in Nautilus (or Files, the file explorer) once so that it can be mounted. This can be irritating since when an application starts which requires a partition they will result in error. Eg, if you have set dropbox to sync to files to Documents drive or Transmission to download files to Multimedia drive.

You can make these NTFS drives automount with Ubuntu by various method as described in this page. But its a long and complicated read. So here is the method explained simply.

Find out Label and UUID

First you need to know the exact Labels and UUID of the drives. Consider UUID (Universally Unique Identifier) as a unique identifier for the drive which will never change (unless you format the drive, re-partition it, or manually change it). To know the Label and UUID you need to use the command blkid command. This command when used with sudo will give you a list of all the partitions along with its Label and UUID. Like below:

vyom@VyomNix:~$ sudo blkid
[sudo] password for vyom: 
/dev/sr0: LABEL="Alpha_0515" TYPE="udf" 
/dev/sda1: UUID="30986b83-1234-4eeb-a30a-482223df145f" TYPE="ext4" 
/dev/sda2: LABEL="WinServer" UUID="3F1234AB1233423C" TYPE="ntfs" 
/dev/sda3: LABEL="Recovery" UUID="A12345E12345AF1B" TYPE="ntfs" 
/dev/sda4: UUID="0659-9A568" TYPE="vfat" 
/dev/sda6: UUID="b1234321-ad5f-4ddd-89ac-eed1234c56c7" TYPE="swap" 
/dev/sda7: LABEL="Digital" UUID="33FA6E12GA6DF687" TYPE="ntfs" 
/dev/sda9: LABEL="Entertainment" UUID="123FHE3E3N98BF65" TYPE="ntfs" 
/dev/sda10: LABEL="Documents" UUID="37MME50B21B7C65B" TYPE="ntfs" 
/dev/sda11: LABEL="Spare1" UUID="654EF123456CAF7E" TYPE="ntfs" 
/dev/sda12: LABEL="Spare2" UUID="68D774EB5DBFPOOI" TYPE="ntfs" 

Continue reading Auto Mounting Drives in Ubuntu

Creating a Startup Application Script in Ubuntu

If you are new to Ubuntu and have installed various softwares, eventually there comes a time when you want the applications to start automatically just after the system boots.

Following are two ways to add applications to startup list. First is Windows method, while the second method is geeky way (as you must have guessed, it’s my favourite).

1. Easy method

Just like Windows have a startup folder where you can place shortcut files and which would let you start the applications when user logs in, in Ubuntu there is a ~/.config/autostart folder where you can place the shortcut files. (Just to recall ~/ is your home folder. So ~/.config = /home/username/.config).

You can also use the Startup Applications tool (ships inbuilt with Ubuntu) which lets you add startup applications to that folder. Shortcut files in Ubuntu are files which ends with .desktop. The folder where you can find most of the .desktop files is /usr/share/applications. So you can just find the desktop file related to the particular application and copy the .desktop file into the ~/.config/autostart folder.

If you want to start the application for every user then you would need to copy the .desktop file in /etc/xdg/autostart folder.

Starup Applications Folder and Tool
Autostart Folder on the left and Startup Applications Tool on the right

Continue reading Creating a Startup Application Script in Ubuntu