Create a public SSH key from the private key

sshI you don’t have or you deleted by mistake the ssh public key of a ssh private key, you can regenerate the public key with the ssh-keygen command:

From the ‘man ssh-keygen’

Easy way to install Oracle Java on Ubuntu

The default Java packages (JRE and JDK) on Ubuntu come from the OpenJDK project. Sometimes we need to use specifically a Oracle Java SE Runtime (JRE) Environment or Oracle Java SE Development Kit (JDK) package on our Ubuntu Desktop or Ubuntu Server and a manual installation on paths like /opt or /usr/local paths isn’t a elegant or clean solution, other than that, you will not receive new package updates.

An easy way to install the Oracle JDK and the Oracle JRE and receive software updates of those packages is by add a repository with installation packages to our system with those instructions:

The following commands add the new apt repository and update the local list of packages:

Now you can choose a version to install, at the moment of this post was written there are Oracle Java 6, Oracle Java 7, Oracle Java 8 and Oracle Java 9 versions:

You don’t need to uninstall the OpenJDK packages that sometimes is needed by other packages as dependencies. Instead you can configure the system to use as default all the Java executables (e.g. javajavac, javadoc, javap and javaws) from a specific installed JRE or JDK with the following commands:

To list the installed Java packages:

To use a specific installed java package:

Now you confirm that the Java executables are used from the chosen Java package:


With those instructions, you will receive new versions of the Java packages through the normal software updates of your Ubuntu operation system.


Launchpad WebUpd8 team

Visual Bell in GNOME 3 Terminal

When using a terminal in GNOME 3, tab auto completion makes the audio bell, you can use a visual bell instead.

Disable audible bell and enable visual bell with:

The default visual bell type is a fullscreen flash, you can change to a titlebar flash only with:

If you prefer the fullscreen flash: