I've tried many different things on this try.

The biggest problem is I don't know what to use in the apt-get command as a name of the package. The internet has been absolutely no help at all in finding the name that should be used to install a given package. I visited Debian's website frequently, looking up my desired package and finding it but it when I try that name with apt-get it does not work. I've copy & pasted it in to the command line as well, to no avail.

I'd just like to install CodeBlocks, GCC, and GDB to my debian based linux OS.

Surely there must be some command or reference I could use to get a list of all the packages that I'm interested in? I did one command which spat out a bunch of package names but it spat out way too many names things to sensibly examine. I apologize if this is super basic, I'm a learning linux user! I have also looked at the man page for apt-get, rest assured.


3 Answers 3


Aptitude or synaptic will provide you with the functionality you seek.

apt-get install aptitude


apt-get install synaptic

The just run aptitude or synaptic directly. Use aptitude for a curses (terminal) interface, synaptic for a GUI.

$ aptitude search [search term]

is the command to search for package names in terminal om Debian-based distros.

I often also use

$ aptitude show [package name]

to examine details about the package before installing, like suggested packages etc., which often is related and useful tools and/or documention not installed by default (if not set in an apt.conf file).

I used these command a lot so I made a couple of shorter names for them in my .bash_alises:

# aptitude "find":
alias aptf='aptitude search'

# aptitude show:
alias apts='aptitude show'
  • While this answer would work, I don't consider it to be a good answer. aptitude search gcc returns more than 200 search results, leaving the user in the dark about which package to install in order to use gcc and gdb normally in Code::Blocks IDE. There are much better ways than this of getting this information in an immediately usable form.
    – karel
    Commented Jan 15, 2016 at 6:43
  • @karel, agreed. Even Synaptic returns too many results to be useful to anyone who doesn't already know exactly what they want (down to version numbers). Only web research on the topic can reveal what those who do know exactly what they are doing would do in your place. Commented Jan 15, 2016 at 12:59

I'd just like to install CodeBlocks, GCC, and GDB to my debian based linux OS.

Well, sometimes the obvious works. So, you could try, to start with:

apt-get install gcc gdb codeblocks

Which would work.

If you don't want to do that, you could try

apt-file -x search ^/usr/bin/gcc$

which gives:

gcc: /usr/bin/gcc
pentium-builder: /usr/bin/gcc


apt-file -x search ^/usr/bin/gdb$

which gives

gdb: /usr/bin/gdb
gdb-minimal: /usr/bin/gdb
gdb-python2: /usr/bin/gdb


apt-file -x search ^/usr/bin/codeblocks$

which gives:

codeblocks: /usr/bin/codeblocks
codeblocks-dbg: /usr/lib/debug/usr/bin/codeblocks

If you don't know a specific file in the package that approach won't work. However, you can still do

apt-cache search gcc


Another approach is to use debtags.

debtags search "devel::lang:c && devel::compiler && interface::commandline && suite::gnu"

which gives:

gcc - GNU C compiler
gcc-4.1 - (short description not available)
gcc-4.1-base - (short description not available)
gcc-4.1-multilib - (short description not available)
gcc-4.3 - (short description not available)
gcc-4.3-base - (short description not available)
gcc-4.4 - (short description not available)
gcc-4.4-base - (short description not available)
gcc-4.6 - GNU C compiler
gcc-avr - GNU C compiler (cross compiler for avr)
gcc-mingw32 - (short description not available)
mingw32-binutils - Minimalist GNU win32 (cross) binutils (transition package)


debtags search "devel::lang:c && devel::debugger && suite::gnu"


ddd - The Data Display Debugger, a graphical debugger frontend
gdb - GNU Debugger
gdb-avr - GNU Debugger for avr
gdb-mingw-w64 - Cross-debugger for Win32 and Win64 using MinGW-w64
gdb64 - (short description not available)
gdbserver - GNU Debugger (remote server)
libc6-dbg - GNU C Library: detached debugging symbols
nana - (short description not available)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .