After Using apt-get Install , Where .deb files are stored in Ubuntu / Debian ?

Here you can see a simple but useful tip for Ubuntu/Debian users

/var/cache/apt/archives

this directory contains the debian packages download by the apt-get

You can Reuse this files for installing  applications in another system.

Advertisements

How to eject a stuck CD/DVD

Some times CD/DVD drives get stuck and will not eject even if you press the eject button on the front panel. The is especially true when any application that was using the CD drive has gone astray. You can try the following steps to get out of the situation.

Open a terminal and become root.

 $ sudo  su

Try eject command.

  # eject

If some application of is using cdrom you will get a message like
umount: /media/cdrom: device is busy

To eject the CD you may have to stop the application. First, let us find out who is using the CD drive.

#fuser  /media/cdrom

/media/cdrom: 5929c 6018c 6020c

You can kill all processes accessing using /media/cdrom

# fuser -km /media/cdrom 

Then try

#eject 

Digital speech in Ubuntu 10.10

You can make your ubuntu terminal speak to to using spd
Open up a terminal window and type this command:

$ spd-say test

Your computer will then say “test”.
If you want to make your computer speak in complete sentences as below.

$ spd-say “ hello how do you do ?" 

You can even feed system variables into the spd-say command. For instance, to get spd-say to speak your current working directory:

$ spd-say $PWD

man spd-say for more details

How to reset mysql root password in Ubuntu

I for got my mysql root password last week. , you can reset your mysql root password.
First You have to Stop mysql server:

#service mysqld stop

Now Start mysql server in safe mode with Follwing Options:

#mysqld_safe –user=mysql –skip-grant-tables –skip-networking 

Now you have to Login to mysql server without password:

#mysql -u root mysql

You will get Mysql Prompt.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>

Now the Time for Resetting mysql root password:
Run the following commands very carefully ( don’t miss semicolon )

mysql> UPDATE user SET Password=PASSWORD(‘newrootpassword’) WHERE User=’root’;
mysql> flush privileges;
mysql> exit

5) Restart mysql server:

#service mysqld restart

6) Login to MySQL With the New Password:

root@server ]# mysql -u root -p
Enter password:
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>