How to search for packages in Ubuntu

Sometimes while working in Ubuntu you may want to find a package, but not know its name. There’s a command for that. It’s called apt-cache.

apt-cache search <your package>

Source

apt – How do I search for available packages from the command-line? – Ask Ubuntu. http://askubuntu.com/questions/160897/how-do-i-search-for-available-packages-from-the-command-line

How to Send Email in Terminal

In this article I demonstrate how to send emails from the terminal of an Ubuntu machine. It’s assumed you have a Mail Transfer Agent like Exim 4 or Postfix set up.

 echo "<message goes here>" | mail \
 -s "<subject goes here>" <to email address>

Sources

How to send email from the Linux command line – Simple Help. http://www.simplehelp.net/2008/12/01/how-to-send-email-from-the-linux-command-line/

How to remove a PPA on Ubuntu

On Ubuntu, you may add a PPA to get some cutting edge feature and then decide you don’t need that feature anymore. So you may decide to remove the PPA to get the regular version of a library. How do we remove a PPA?

Use the –remove flag, similar to how the PPA was added:

sudo add-apt-repository --remove ppa:whatever/ppa

A safer alternative is to use ppa-purge. Install it with the command:

sudo apt-get install ppa-purge

And then remove the PPA, downgrading gracefully packages it provided to packages provided by official repositories:

sudo ppa-purge 

How to fix error Ascii codec can’t encode unicode character in Django on Ubuntu

In this article I will discuss how to fix error messages saying Ascii codec can’t encode some unicode character when setting up Django on Ubuntu.

A solution is to change the LANG and to set the LC_ALL environment variables.

So, edit /etc/apache2/envvars

Change

LANG=C

to

LANG='en_US.UTF-8'

Also add the following:

LC_ALL='en_US.UTF-8'