Page 1 of 1

Command for searching through installed programs

Posted: Tue Jun 28, 2011 8:15 pm
by stephenskocpol
Hello everyone,

I'm new to Linux, installed Mint yesterday. So far, I must say I really like it. I like the many options I have, the interface looks nice, and it's a lot faster than my windows 7.

I discovered the 'apt' command in terminal. With it, I can install and remove programs, or search for programs to install.

I would like to see and search through the packages I have installed on my system. I can't seem to find any way to do that. Is there some subcommand within 'apt' or is there a completely different command I need to use?

Thanks in advance,
Stephen

Re: Command for searching through installed programs

Posted: Tue Jun 28, 2011 8:38 pm
by Habitual

Code: Select all

dpkg --get-selections | grep -w install | cut -f1

Re: Command for searching through installed programs

Posted: Tue Jun 28, 2011 8:53 pm
by AdamS
There is a easier way.
Screenshot-9.png
Screenshot-9.png (169.62 KiB) Viewed 609 times

Re: Command for searching through installed programs

Posted: Tue Jun 28, 2011 10:18 pm
by stephenskocpol
Habitual wrote:

Code: Select all

dpkg --get-selections | grep -w install | cut -f1
Thanks! Could someone maybe explain what exactly I'm typing here? That way I'll be able to learn and use it better! :D

Re: Command for searching through installed programs

Posted: Tue Jun 28, 2011 10:37 pm
by Elisa
BTW, when you wanna have an info of a concrete app (doesn't care if it's installed or not), try this:

aptitude show package_name


As for what's goin' on, simply:

pipe aka "|" is just a connector - joiner of the out-put, so =>

dpkg --get-selections | grep -w install | cut -f1

means =>

let the output of "dpkg --get-selections" is set aka is filtered yet with "grep -w install" and finally the last 'filter' then "cut -f1"

What individual commands do, read carefully:

man dpkg [and then look at the '--get-selections']
man grep [and then look at the -w]
man cut [and then look at the -f]

type those commands in a terminal to read them (man ...)

Re: Command for searching through installed programs

Posted: Wed Jun 29, 2011 12:15 pm
by stephenskocpol
...And slowly but surely I will become more and more fluent in the terminal. Thanks everyone!

Re: Command for searching through installed programs

Posted: Wed Jun 29, 2011 2:50 pm
by Habitual
It gets easier with time and experience, like everything else. :)

Affirmations like
stephenskocpol wrote:...I will become more and more fluent in the terminal...
definitely help you get better.

Re: Command for searching through installed programs

Posted: Wed Jun 29, 2011 5:19 pm
by stephenskocpol
Habitual wrote:
Affirmations like
stephenskocpol wrote:...I will become more and more fluent in the terminal...
definitely help you get better.
Stating your goal does actually help you achieve it!

Re: Command for searching through installed programs

Posted: Wed Jun 29, 2011 9:11 pm
by Habitual
Elisa:

That hippytest is funny.