Installing a new software package via a command line terminal in Ubuntu Karmic Koala (and basically all the other versions preceding it) is deceptively easy thanks to the powerful apt-get command that is used as the interface into Ubuntu’s Advanced Packaging Tool (APT). It can be used to install new software applications, upgrade existing software packages, update the current package list index and even go as far as upgrading the entire Ubuntu system.
The usage of apt-get to install a software package (like the network scanner nmap for example) is as simple as entering:
sudo apt-get install nmap
Similarly, to remove a package you simply change the above command to:
sudo apt-get remove nmap
Note that you can specify multiple packages to be installed or removed, separated by spaces. So for example sudo apt-get nmap gedit would install nmap and gedit respectively. Apt-get is also quite useful for updating the package index, in other words the database that holds all the available packages from the repositories defined in the /etc/apt/sources.list information file. The command to do this is:
sudo apt-get update
Lastly, apt-get is even powerful enough to update your Ubuntu installation itself. First run an update against your package index (as above) and then type:
sudo apt-get upgrade
As for log files of apt-get activity, see /var/log/dpkg.log. For more help on the command, a simple apt-get help will suffice.
There. Now you know! :)
(And for an easter egg while you’re at it, you may as well enter apt-get moo. If you get an answer, well then at least you know that you have Super Cow Powers!)
Related Link: https://help.ubuntu.com/8.04/serverguide/C/apt-get.html







Using both Pages and Categories for WordPress’ Page Menu
A lot of Wordpress themes made use of the handy WordPress page_menu() function that generates the main page horizontal page navigation bar at the top of the website. However, there is one annoying little restriction this handy functionality comes packaged with, namely:
How do I use both pages and categories for the main navigation page menu bar at the same time?
Frustrating, really it is.
However, after digging around a little I have come up with a little hack that solves this dilemma for us, though be warned, you purists out there are not going to like it – after all, it does involve editing a core WordPress file – meaning in essence that should you upgrade your WordPress installation you’ll most likely have to add in this hack all over again.
But hell, if you don’t mind that then read on a little – after all, as you can see above on my blog’s menu, it seems to be working damn well thank you very much! :)
So here goes. First, locate the post-template.php file that will be sitting directly in your /wp-includes folder. Open that file and browse to line 836, where you should come across a line that reads:
What this line is doing is basically building up the return menu string by calling the built in wp_list_pages WordPress function. So our trick is going to be to extend that returned menu string by adding on our category listing to the end of it in the correct format that it expects.
And these are the lines you need to add directly after the line above:
As you can see, all we are doing is making use of WordPress’ wp_list_categories call which we’ve extended by asking to include some specific categories only. (Of course, we could skip this step by leaving out the first of our added lines, or perhaps change it to exclude certain categories by changing the call to ‘exclude’).
In any event, saving the changes to our file and uploading it back to the server, you should now find that on reloading your website that all of a sudden you have both pages and categories listed side by side in the main navigation menu.
Nice! :)