Autocomplete with apt-get November 24th, 2008

A lot of times I don't get the exact name of the package I want to install right away. So one solution, via the command line to be able to know the correct name is, code: sudo apt-cache search package If that yields too many options I filter it via grep: sudo apt-cache search package | grep "type" Ths is extremely inefficient. The bast way to go is to add a line to ".bashrc" to have autocomplete for bash and apt-get: echo "source /etc/bash_completion" >> ~/.bashrc I think I am getting a lot of customizing around, so I am going to start building a script that will run whenever I upgrade or change machines to have all of my custom settings ready.
Posted in server |

2 Responses to “Autocomplete with apt-get”

  1. Adam Shand On

    I'm a big fan of this variant as well: # apt-cache --names-only search <package>

  2. Ben On

    or just "aptitude search [package]"

    But I do love apt auto-completion :)

Leave a Reply

3+3


Living Ubuntu

I discovered Ubuntu in its second release thanks to a PC Magazine Ranking. Haven't stop using GNU/Linux since. This place is where I put all the stuff that I stumble upon and fix later. Hope you find it useful.

Links

Twitter

    Follow Me