Show customize date format

Some times we need to show date at customize format. As usual we can’t use format function to format the date at SQL. For that we need to use date_format function to show it.Example is bellow.

select date_format(column_name, ‘%d-%m-%Y’) from table_name;


Mount a ISO file on Linux system.

Mount a ISO file in Linux system is very easy…. Just follow the following command.

mount -t iso9660 -o ro,loop=/dev/loop0 ubuntu.iso /media

Here ubuntu.iso means the ISO file that you want to mount and media means the mounted location that you want to mount.

Installing Apache, MySQL Server 5, phpmyadmin on Ubuntu

To Install Apache, MySQL Server 5, phpmyadmin on Ubuntu you need to run the following command on Terminal.

First Open Terminal (Press Alt+F2 for open run dialogue box, type gnome-terminal and press Enter)

sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5-mysql
sudo apt-get install phpmyadmin

sudo apt-get install mysql-admin

To create a new database, use the mysqladmin command:

mysqladmin create <databasename>

Remotely shutdown windows from Ubuntu

There is little bit command to shutdown Windows PC like XP remotely from Ubuntu terminal.

For Shutdown windows:
net rpc shutdown -I -U user_id%password

For abort the Shutdown:
net rpc abortshutdown -I -U user_id%password

Here user_id means your windows User ID like Administrator or User and password means the windows User password.

Backup & Restore installed package.

to backup packages
1. sudo nautilus
2. copy from /var/cache/apt/archives/* to Desktop/inst_packages

Run in terminal
sudo dpkg –get-selections > ~/Desktop/inst_packages/myPackages

To Recover packages
1. sudo nautilus
2. Paste backup packages to /var/cache/apt/archives/
3. Run in Terminal
sudo dpkg –set-selections < myPackages && sudo apt-get dselect-upgrade