Generate QR Code in Ubuntu Linux

You can easily generate QR Code under Ubuntu using the command line ‘qrencode’ package. In Ubuntu 11.04 Natty Narwhal, you can install qrencode using this command:

apt-get install qrencode

To generate QR Code image, you only need to run this command:
qrencode -l L -v 1 -o qrcode-test.png "Hello, World!"

QR Code is a form of 2 dimensional barcode which can store arbitary text data including URL, email or plain text. For more information, please refer to the QR Code Wikipedia Entry

Easy File Encryption On Ubuntu Linux with OpenSSL

Here’s an easy way to encrypt your file using OpenSSL. The general syntax is:


openssl enc (cipher) -e -in (input file) -out (output file)

so to encrypt a “plaintext.txt” file, using aes256, you only need to run this command:

openssl enc aes256 -e -in plaintext.txt -out encrypted.txt

Similarly, to decrypt the file, you can run the command:

openssl enc aes256 -d -in encrypted.txt -out decrypted.txt

Debian: Force users to use more secure login password with pam_cracklib

One of the factor that makes your system easily crackable is the weak password. PAM cracklib forces users to choose stronger password by analyzing the password strength, length and entropy.

To enable pam_cracklib in Debian / Ubuntu operating system, you need to install libpam_cracklib:

sudo apt-get install libpam_cracklib

Then edit the “/etc/pam.d/common-password” file using your favorite editor. Then, add and uncomment the following line at the end of the file.

password required pam_cracklib.so retry=3 minlen=6 difok=3

difok determines the number of same characters that allowed to be present in the old and new passwords.

Quick Way to upgrade to Ubuntu 10.10 Maverick Meerkat

Ubuntu 10.10 Maverick Meerkat release is just around the corner!

Here’s how to upgrade Ubuntu 10.10 Maverick Meerkat using bash shell

sudo sed -i 's/lucid/maverick/g' /etc/apt/sources.list && sudo aptitude update && sudo aptitude dist-upgrade

sudo aptitude install update-manager-core
sudo do-release-upgrade -d

That’s it! Happy upgrading!

3 ways to get Linux release information from bash terminal

Let’s say you’ve manage to get yourself into a GNU/Linux bash terminal. What can you do in order to determine its distro and release information? Listed here are the three methods to get release information of a running GNU/Linux box.

lsb_release method
You can type “lsb_release -a”

Cat /etc/proc/release method

/etc/*release and /etc/*issue method
Alternatively, you could try typing “cat /etc/*release” or “cat /etc/*issue”.

Cat /etc/proc/release method

/proc/version method
If else fails, you could always try the “cat /proc/version” method to see where the kernel came from.

Cat /etc/proc/release method

Hope this would help!