Tuesday, July 17, 2012

How to build an exactly similar ubuntu installation on another computer

Here is an easy  way to  build an exactly similar  ubuntu installation on another computer.

Run
$ dpkg --get-selections >my_pakages

on the machine that you want to clone. Install a clean copy of Ubuntu on the target machine. Copy the file my_packages to the target machine.
Run the following command on the target machine.
sudo dpkg --set-selections < ./package_names
sudo apt-get -u dselect-upgrade

 Done.

Monday, June 18, 2012

How to Change the php file upload limit in Ubuntu Linux

The maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that open  the file /etc/php5/apache2/php.ini with command

sudo nano /etc/php5/apache2/php.ini

Now  search for “upload_max_filesize” with (default 2M) your value. Save the file. Restart Apache webserver.

sudo /etc/init.d/apache2 restart

 

Sunday, June 17, 2012

Install Norton Cammander Like File Manager SunFlower in Ubuntu/Debian Linux

Sunflower is Open Source, twin panel, very simple and  highly customizable File Manager for Linux with plugins support. it is like old Norton commander and MC.

How to install

Open a Terminal and type the following

  • sudo add-apt-repository ppa:atareao/sunflower
  • sudo apt-get update
  • sudo apt-get install sunflower

Friday, June 15, 2012

How to install GCC 4.7 in Ubuntu 12.04

How to Install GCC 4.7 in Ubuntu 12.04

You can try this PPA (https://launchpad.net/~ubuntu-toolchain-r/+archive/test) for installing gcc 4.7.
 Note that it has packages only for 12.04

Open a terminal and run the following commands

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-4.7

Thursday, June 14, 2012

How to Find Most Recently Updated File in PHP

How to Find  Most Recently Updated  File  in PHP

$path "./";  // put your directory path here 
foreach (glob($path) as $filename
if (filemtime($filename) >= $recentDate)
 $recentDate filemtime($filename); 
 $recentDate date(" F d, Y",$recentDate); 

echo
"Most Recently Updated File".$recentDate;?>

Monday, June 11, 2012

How to install Gnome 3 in ubuntu 12.04


By using the following Steps You can Install the  latest version of Gnome 3 in Ubuntu 12.04

Open a terminal
 $ sudo add-apt-repository ppa:gnome3-team/gnome3 
 $ sudo apt-get update 
 $ sudo apt-get install gnome-shell
 Now Logoff the system and select Gnome


Monday, February 27, 2012

HOW TO ADD DNS IN UBUNTU / DEBIAN LINUX

How to set up DNS in Ubuntu

 You can add hostname and IP addresses to the file /etc/hosts for static lookups.

 You can add your DNS Server Ip address  for name lookups  to /etc/resolv.conf.

For example If you want to add  the DNS server at IP address 8.8.8.8

    sudo vi /etc/resolv.conf


If you have GUI use the following command

    gksudo gedit /etc/resolv.conf

enter the following details

    search test.com
    nameserver 8.8.8.8

Tuesday, December 13, 2011

How to Find HardDisk Partitian UUID, Label , Type and Device node Identifier in Ubuntu / Debian Linux

 Some times you need to know the  device node identifier. e.g. /dev/sda1, a partition UUID,  a partition label or partition type (ntfs,fat32 etc). By using the following command you can see all the  relevant information about your partitions.


 Open a Terminal

$ sudo blkid -c /dev/null

sample output

/dev/sda1: UUID="D8C0A470C0A45692" TYPE="ntfs"
/dev/sda5: LABEL="Ddrive" UUID="FA0C1D8C0C1D44D3" TYPE="ntfs"
/dev/sda6: UUID="1ccc38e0-5981-438b-adc0-d90301eee022" TYPE="ext4"
/dev/sda7: UUID="03a0bd37-b163-49a2-b1a9-33017d764ba8" TYPE="swap"
/dev/sda8: LABEL="ibex" UUID="61f6b15b-8be8-43d8-904f-4e599b608994" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda9: UUID="3b70839c-525c-490c-9892-791a539b3005" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda10: LABEL="EDrive" UUID="E8B8420AB841D7A8" TYPE="ntfs"
/dev/ramzswap0: TYPE="swap"

Monday, December 12, 2011

How to Monitor Realtime Network Traffic in Ubuntu / Debian Linux

Here you can see How to Monitor Realtime  Incoming Network Traffic in Ubuntu / Debian Linux with simple Utility IFSTAT

How to Install ifstat

Open a terminal

$ sudo apt-get install ifstat

How to run

$ ifstat

output
eth0                  eth1                     
 KB/s in  KB/s out   KB/s in  KB/s out   
    4.67      5.21      3.67      5.05  
    3.93      4.59      0.38      0.74  
    3.93      4.59      6.19      8.30  
    3.93      4.59      3.03      4.33  

Thursday, December 8, 2011

sudo with out asking password in Ubuntu / Debian Linux

How to sudo with out asking password in Ubuntu / Debian Linux
open a terminal 
 
$ sudo visudo
 
Now Add this line at the end (change “panayara” to your username):

panayara ALL=(ALL) NOPASSWD: ALL
 
Ctrl-X to leave, save your changes, and you're done!