Ubuntu – How to find the package name to install an app using terminal

package-managementsoftware installationsoftware-center

The install button of the Software Center of my Ubuntu 14.04 is disabled for unknown reason. So I want to install software using terminal. But I don't know the package name.

So how can I get the package name?

N.B: I can see the details of software using Software Center, just not install.

Best Answer

You could search the APT cache for it:

apt-cache search <keyword/regex>

E.g. if I wanted to install SuperTuxKart, but didn't know the package name, I'd use apt-cache search tux. This would return a list of packages whose name or short description contains this keyword or matches the regex. An extract from the search for tux:

supertux-stable - Classic 2D jump 'n run sidescroller with Tux
supertuxkart - 3D kart racing game
supertuxkart-data - 3D kart racing game (data)
supertuxkart-dbg - 3D kart racing game (debug)
tuxcards - hierarchical notebook for note and idea management
tuxcmd - twin-panel (commander-style) file manager using GTK+ 2

Now I search the results for SuperTuxKart and find the package supertuxkart. This obviously is the package name.