Add user with sudo rights

Adding users is done on Ubuntu 14.04.
You can find the Ubuntu version running "lsb_release -a" in the terminal.

adduser USERNAME

adduser USERNAME sudo

Switch to new user


Install MongoDB driver for PHP on Ubuntu

Type following line in command line:

sudo pecl install mongo

If Pecl throws this error: configure: error: sasl.h not found! add following command and retry installing mongodb

sudo apt-get install libsasl2-dev

After installing, add the mongo extension to php.ini

Restart apache:

Get current Ubuntu version

Get Ubuntu version by typing

lsb_release -a

in command line.


My current version is 14.4


Install MongoDB on Ubuntu

32 bit systems are limited to DB of 2 gig. Therefor, use MongoDB only on 64 bit systems in production.

@see MongoDb documentation to install MongoDB.

See if MongoDB is running by typing

sudo service mongodb status

in command line.


How to reconfigure keyboard on a Debian based distro

When the keyboard on a Debian based distro isn't properly configured, the configuration can be altered by using the following command:

sudo dpkg-reconfigure keyboard-configuration

dpkg-reconfigure needs to be executed as root.

Restart the system after saving the new configuration.

sudo reboot

Troubleshoot internet connection problems with the ping command

The ping command

Ping is a command line network utility tool to test network connectivity. ​It tests the connection between a sender and a receiver node. It reports whether the receiver node responds by sending an echo request. The receiving node responds with an echo reply.

Ping simply sends a signal to another computer and waits for a response.

How to install Xdebug on Debian based OS like Ubuntu

sudo apt-get install php5-dev

sudo pecl install xdebug

Edit the php.ini file, located on /etc/php5/apache2/php.ini

Add following lines to the php.ini file:

zend_extension = "/usr/lib/php5/CHECK_OUT_DIRECTORY_NAME/"
; Use Get or Post parameter XDEBUG_PROFILE=1 to create a new cachegrind file.
xdebug.profiler_enable_trigger = 1
xdebug.profiler_enable = 0
xdebug.remote_enable = 1
xdebug.profiler_output_dir = "/tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"


How to install LAMP stack on Debian

  • sudo apt-get update
  • sudo apt-get install apache2
  • sudo apt-get install mysql-server
  • sudo apt-get install php5 php5-mysql

Get IP address by using ifconfig


From another device on the same network, browse to IP address. E.g.

If you see the "It works' page, it actually works.

Subscribe to RSS - Linux