MOVING!!!

Hey there, after several years of playing with Blogger and trying to get thing sorted out how I wanted, I finally decided to host my own domain so I could manage things easier. So this blog (which, admittedly, hasn't been updated much) is getting moved to my all-new site: DavisTobias.com/Linux. Also, to make it easier to transfer RSS feeds, this is the link to the new RSS feed. I'll leave this site and it's posts up, so I don't contribute to dead links on the internet, but I'm shutting off comments and won't post any more here.

November 28, 2009

Showing the list of installed packages

Hey there, this site has moved, so comments are disabled. Thankfully, you can go to the page, carefully linked for your satisfaction. Click here to go there.

I haven't had much time to play around in Linux for a while, what with school, but I recently got a new desktop computer and installed Windows 7 (the horror!) and am now doing some development using VirtualBox, the computer virtualization software. My desktop has all the power I will need for some time, but I would like a light-weight version of Ubuntu (my favored flavor) to install on my newly acquired Asus EEE PC 900A.

Later on I will post some of my findings, but for now I just wanted to point out the helpful command which will list all the packages currently installed: dpkg --get-selection

A word on the commands:
dpkg This is the debian package manager
--get-selection This is the command to list the installed packages

Another trick:
dpkg -L package This will list all the files associated with the package
dpkg --get-selection | grep package The "grep" command will search through the lengthy list and display anything with "package" in it's name.

This handy command will list every package currently installed, which is super helpful once you've generated your custom blend of software but haven't written down what you installed. Which I obviously did. Many times.

Of course, this list turns out to be a bit lengthy and unwieldy, especially since it outputs the list right in the terminal. Thankfully you can make the list go into a text file by using the command: dpkg --get-selection > filename.txt

The carat symbol, >, will take whatever would have gone to the terminal display, and output it to a file, "filename.txt".