debian系统 mail 命令不存在如何安装

发送邮件是个很常见的需求,在linux中发送邮件用 mail

which mail
/usr/bin/mail

安装命令 apt-get install bsd-mailx

apt-get install bsd-mailx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  exim4-base exim4-config exim4-daemon-light libgnutls-dane0 libgnutls30
  liblockfile1 libunbound8
Suggested packages:
  exim4-doc-html | exim4-doc-info eximon4 spf-tools-perl swaks dns-root-data
  gnutls-bin
The following NEW packages will be installed:
  bsd-mailx exim4-base exim4-config exim4-daemon-light libgnutls-dane0
  liblockfile1 libunbound8
The following packages will be upgraded:
  libgnutls30
1 upgraded, 7 newly installed, 0 to remove and 76 not upgraded.
Need to get 4,055 kB of archives.
After this operation, 5,727 kB of additional disk space will be used.
Do you want to continue? [Y/n]