2

If I only know what feature I want to add to my server/desktop, for example a mail server, how on earth, can I tell what packages should I get via apt-get?

terdon
  • 104,119

5 Answers5

7

You can always look it up, which is just what I do.

Using your example of wanting to install an email server, I would open Google and search

set up email server ubuntu

With that search, the first result is this DigitalOcean article, titled "How To Install and Setup Postfix on Ubuntu 14.04." (Also exists for 16.04) Now I know that the email server on Ubuntu is most likely called Postfix, and I also have a guide on setting it up.

Now, maybe I don't like DigitalOcean for whatever reason, or maybe I'd just prefer a StackExchange Q&A, because those are easier to read for me. With that in mind, I'd search

set up email server ubuntu

And voila: How do I set up an email server?

That contains a very detailed answer on setting up a mail server on Ubuntu, using the mail-server package. One result below that question is this one: simple method to install a mail server

It provides yet another method for setting up a mail server.


What you really, really, really need to do when using Ubuntu (well, anything really) is look it up. I could say there's no index that lists all the packages for different mail servers, but there is; it's called The Internet. Use this index to your advantage. Package names can be weird, which is why using a search engine can be very beneficial.

If it turns out you can't find what you're looking for, ask here, as you have just done. Chances are, it already has an answer and will be closed as a duplicate (I'm seeing more and more of those lately, and this question is very likely one as well), but there's nothing wrong with that, especially if you get your answer. In fact, duplicates help others as well, as your question might show up to different search terms than the question it is a duplicate of.

TheWanderer
  • 19,525
  • 12
  • 52
  • 65
5

You can just try apt-cache search 'mail server'. It should list packages related to this search and in this state, you should be able to select which one you need.

apt-cache search 'mail server' results in my system these

→ apt-cache search 'mail server'
ktnef - Viewer for mail attachments using TNEF format
libkf5ksieveui5 - Sieve, the mail filtering language, GUI library
libksieveui5 - Sieve, the mail filtering language, GUI library
nginx-common - small, powerful, scalable web/proxy server - common files
nginx-extras - nginx web/proxy server (extended version)
libksieveui4 - Sieve, the mail filtering language, GUI library
spamc - Client for SpamAssassin spam filtering daemon
libclamav6 - anti-virus utility for Unix - library
xmail - advanced, fast and reliable ESMTP/POP3 mail server
mail-stack-delivery - mail server delivery agent stack provided by Ubuntu server team
amispammer - Powerful Mail Server checker on blacklists
courier-base - Courier mail server - base system
courier-doc - Courier mail server - additional documentation
courier-faxmail - Courier mail server - Fax<->mail gateway
courier-imap - Courier mail server - IMAP server
courier-imap-ssl - Courier mail server - IMAP over SSL
courier-ldap - Courier mail server - LDAP support
courier-maildrop - Courier mail server - mail delivery agent
courier-mlm - Courier mail server - mailing list manager
courier-mta - Courier mail server - ESMTP daemon
courier-mta-ssl - Courier mail server - ESMTP over SSL
courier-pcp - Courier mail server - PCP server
courier-pop - Courier mail server - POP3 server
courier-pop-ssl - Courier mail server - POP3 over SSL
courier-ssl - Courier mail server - SSL/TLS Support
courier-webadmin - Courier mail server - web-based administration frontend
feed2imap - feed aggregator (RSS/Atom) which puts items on a IMAP mail server
libnet-server-mail-perl - versatile and extensible mail server framework
mailfront - mail server network protocol front-ends
mlmmj - mail server independent mailing list manager
prayer - standalone IMAP-based webmail server
sqwebmail - Courier mail server - webmail server
tumgreyspf - external policy checker for the postfix mail server

Looking at the description beside the package name, It seems xmail, prayer and sqwebmail could be the names I needed.


If you have synaptic package manager installed, you can also search in it by clicking the search button.

Here is a screenshot for doing it in synaptic

synaptic search

Anwar
  • 77,855
1

If you know the name of the binary, you can search for it with apt-file.

If you want to know which package provides /usr/bin/emacs, use

apt-file search /usr/bin/emacs

See https://help.ubuntu.com/community/AptGet/Howto#line-103.

v7d8dpo4
  • 111
0

I recommend to follow the other answers, usually research is a good idea.

But you're just looking for ways to add basic functionalities like various servers (such as web, database, mail etc), different Desktop Environments tasksel can be a good option as well. tasksel let's you select tasks like "Mail server" and installs the necessary default packages for that task.

sudo apt-get install tasksel 
sudo tasksel

Check the screenshot for of a tasksel waiting for selection

Tasksel screenshot

Anwar
  • 77,855
Jakob Lenfers
  • 1,105
  • 7
  • 17
0

If you want a user-friendly apt-get you should be using apt. It also provides the search command which searches for package names and descriptions:

$ apt search "mail server"
$ apt search database GUI
Bakuriu
  • 642