The proper way to install virtualbox on Ubuntu Linux

 sudo apt-get install -y dkms linux-headers-generic

wget -q -O- | sudo apt-key add –

For Ubuntu 14.04

sudo sh -c 'echo "deb trusty contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Ubuntu 13.10

sudo sh -c 'echo "deb saucy contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Ubuntu 13.04

sudo sh -c 'echo "deb raring contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Ubuntu 12.10

sudo sh -c 'echo "deb quantal contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Ubuntu 12.04

sudo sh -c 'echo "deb precise contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Ubuntu 11.10

sudo sh -c 'echo "deb oneiric contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Ubuntu 11.04

sudo sh -c 'echo "deb natty contrib" >> /etc/apt/sources.list.d/virtualbox.list'

Once you added the repo using the above command, Update your repository.

sudo apt-get update && sudo apt-get install -y virtualbox-4.3

Fix Mysql Workbench passwords not being saved in keychain – Debian – Ubuntu

 A fix for this issue with Ubuntu



add this path to your .profile 


reload the source

log off your gnome session,

try with workbench again

You should be prompted for a password to unlock the keychain if it is locked. Use your current account password to do so.

This is a temporary workaround. 


Another fix submitted by a user


Thanks for the tip! I placed the following wrapper script at /usr/local/bin/mysql-workbench to work around the bug:

if [ -n "${XDG_RUNTIME_DIR}" ]; then
/usr/bin/mysql-workbench ${@}



Samba Debian 7 Wheeze – Cannot Install Updates apt-get -f does not work

Seem this is due to a bug.

How to fix.

run this command

rm /etc/dhcp3 


I came accross this ina  similar situation.
When installing samba-common:

dpkg: error processing /var/cache/apt/archives/samba-common_2%3a3.6.3-2ubuntu2.3_all.deb (--unpack):
 unable to open '/etc/dhcp3/dhclient-enter-hooks.d/samba.dpkg-new': No such file or directory

In my case /etc/dhcp3 was a link to /etc/dhcp, because it was needed for Vmware customisations scripts:

The samba package just cannot handle that at all though.
Removing the link, allows samba to install:
rm /etc/dhcp3
(or copying the directory as noted above).
Howver this is not nice at all, having two directories for dhcp and one or the other might be read depending on circumstances.

So to me this is bug in the samba packaging.
==> Could this issue be re-opend please and the samba packaing examined?

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to samba in Ubuntu.

  package samba-common 2:3.5.8~dfsg-1ubuntu2.4 failed to
  install/upgrade: unable to open '/etc/dhcp3/dhclient-enter-
  hooks.d/samba.dpkg-new': Too many levels of symbolic links

Status in “samba” package in Ubuntu:

Bug description:
  When I tried "apt-get install -f" from a command line, I got this:

  Reading package lists... Done



How to check and set locale settings Ubuntu / Debian

This is useful when you need to install apps that require precise locale settings..


From a terminal run:

nano /etc/locale.gen


You will get something like this


en_GB ISO-8859-1

en_GB.UTF-8 UTF-8

en_GB.ISO-8859-15 ISO-8859-15

en_US.UTF-8 UTF-8

# aa_DJ ISO-8859-1

# aa_DJ.UTF-8 UTF-8

# aa_ER UTF-8

# aa_ER@saaho UTF-8

# aa_ET UTF-8



Valid locale settings are en_GB.UTF-8 , en_US.UTF-8 


Change Ubuntu / Debian Hostname after installation


Using the terminal,

sudo nano /etc/hostname


Using Terminal and graphical editor. (this requires Ubuntu / Desktop desktop edition)

[ Also, this method requires gksu which can be installed using

sudo apt-get -y install gksu


gksudo gedit /etc/hostname


Change the hostname to what you desire and reboot.


To change the hostname for the current session without making permanent change you can also use


sudo hostname mnewhost.localdomain

Make Install / Checkinstall



How to uninstall packages that are installed using ‘make install’


This stack overflow article shows different options


make clean removes any intermediate or output files from your source / build tree. However, it only affects the source / build tree; it does not touch the rest of the filesystem and so will not remove previously installed software.

If you’re lucky, running make uninstall will work. It’s up to the library’s authors to provide that, however; some authors provide an uninstall target, others don’t.

If you’re not lucky, you’ll have to manually install it. Running make -n install can be helpful, since it will show the steps that the software would take to install itself but won’t actually do anything. You can then manually reverse those steps.

+1; Watch out for files that might also have been installed by other packages. Simply deleting these files (one interpretation of “manually reversing those steps”) could break the other packages. This is (one of many reasons) why package managers were invented. – Merlyn Morgan-Graham May 10 ’13 at 0:41

this is only possible if you keep the same configured and compiled build directory right? thus not very useful since most people would delete it after install. He wants to uninstall things regardless if he kept the build folder, and regardless if the package has been correctly configured for an make uninstall option. Clarification: what he wants to do is to enable some kind of management for packages that works for things he compiled himself. – Nisse Jul 27 ’13 at 6:11

If sudo make uninstall is unavailable:

In a debian based system, instead of doing make install you can run sudo checkinstall (or .rpm etc. equivalent) to make a .deb that is also automatically installed. You can then remove it using synaptic.



This answer is proof that the best answers often don’t get a lot of up-votes. Thanks! I’ve wanted to know how to do this for a long time. I always hesitate doing a “make install” because I know it will almost certainly be a pain to remove. – doug65536 May 24 ’13 at 18:53

also the LFS book has some information on package management systems, Since you have to set it up yourself. The information there should be helpful in getting this kind of thing work better(cleaner, more general). There are scripts that simply listen to what gets installed and then creates a script that when launched deletes all those files, or something like that. – Nisse Jul 27 ’13 at 6:18

This worked beautifully for me, even though I already had run make install before using checkinstall instead. – LukeGT Mar 6 at 7:43



Fix fusemount: fialed to open /dev/fuse: Permission denied


On Debian reboot after making these changes. It will save your time and avoid issues. 


If you haven’t already discovered the wonders of sshfs, you really should start using it — it’ll probably shave hours of your day as a web developer.  Every now and then I come across the following problem when first installing sshfs and have to take a moment to think about the problem, so I’ve decided to post it up here to help anyone else and as a reminder to my forgetful self.

fusermount: failed to open /dev/fuse: Permission denied

usermod -aG fuse <your-username>

exec su -l $USER


Depending on your setup you may need to prefix the solution commands with sudo although this isn’t specific to any platform and many user su. You may not need to reboot but it could save you some hassle in the long run if the problem still persists.  It’s common sense but just in case you didn’t get it, replace <your-username> with the username you use.