We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

vanne on 03/13/07


Tagged

Bash ubuntu linunx


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

basicmagic


List/Search Packages installed


Published in: Bash 


List all packages that are installed in your system

  1. dpkg -l
  2. # you can alternatively search for packages using the following
  3. dpkg -l | grep [enter_search_term_here]
  4. # or if you like shortcuts, here is one that you can put in ~/.bashrc or ~/.bash_profile
  5. # instead type in dpkg ... you can use : find_package "name_of_package"
  6. find_package () { dpkg -l | grep "$1"; }

Report this snippet 

You need to login to post a comment.