On console, run
dpkg -L [package name]
On console, run
dpkg -L [package name]
To find the list of installed packages on ubuntu/debian, on console run
<pre>dpkg --get-selections</pre>
To find if a specific package is installed –
<pre>dpkg --get-selections|grep <packagename></pre>
To enable password based authentication on RHEL/Centos machines, login as root to the target host. ( sudo the commands below if you are not logging in as root)
1. Create the password authenticated user if not already created –
2. Add the user to sudoers and enable remote login –
3. Enable password authentication for SSH.
4. To disable password authentication after use, in the above file replace “PasswordAuthentication yes” with “PasswordAuthentication no“; reload sshd as before.
Problem: SSH asks for password even after updating the .ssh/authorized_keys in target host with user’s public key.
Reason: A permission issue
Fix: Login with password, in console run
chmod -R 700 ~
Log out and try again. The public key login should work now.
Problem: The arrow keys insert characters, no status message at the bottom etc.
Reason : The default Vim on Ubuntu is vim-tiny, a skeleton version.
Fix: Install the real stuff – sudo apt-get install vim
Note: vi = Visual, vim = Visual improved. And vim-tiny is vi compatible, kind of Jurassic.
Install JDK on Ubuntu manually without depending on PPAs –
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_32/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_32/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_32/bin/javaws" 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
Run java -version to verify installation. Cheers!
Problem : Eclipse gives the error – “[function/type] is not accessible due to restriction on required library … rt.jar” when building a project.
Reason: Project classpath (in the build path) is refers to JRE in place of the JDK in which the Project is configured to work with.
Fix: Go to Java Build Path > Libraries, choose JRE System Library, click Edit button. From the dialog choose Alternate JRE and choose the required JDK.
Problem: Ubuntu gives error “Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?” when using apt-get.
Reason: Another apt-get update working or Update manager checking for updates.
Fix: Close Update manager/ wait of current apt-get update to finish, and try again.
To create a shortcut to an application or location on the desktop (Ubuntu 12+), on terminal run –
sudo apt-get install gnome-panel
, else directly do step 2.
gnome-desktop-item-edit ~/Desktop/ --create-new
If shortcut to an installed application is to be created –
(from mhdizam’s comment, verified working)
To add a folder to favorites in left tab of nautilus –