软件包fortune
(或fortune-mod
)仅包含显示幸运饼干的程序,而不显示饼干(文本)本身。
您需要另外安装一个fortunes*
软件包。使用命令可以轻松检查哪些系统可用apt-cache search "^fortunes"
。在我的系统上,输出为:
fortunes - Data files containing fortune cookies
fortunes-bg - Bulgarian data files for fortune
fortunes-bofh-excuses - BOFH excuses for fortune
fortunes-br - Data files with fortune cookies in Portuguese
fortunes-cs - Czech and Slovak data files for fortune
fortunes-de - German data files for fortune
fortunes-debian-hints - Debian Hints for fortune
fortunes-eo - Collection of esperanto fortunes.
fortunes-eo-ascii - Collection of esperanto fortunes (ascii encoding).
fortunes-eo-iso3 - Collection of esperanto fortunes (ISO3 encoding).
fortunes-es - Spanish fortune database
fortunes-es-off - Spanish fortune cookies (Offensive section)
fortunes-fr - French fortunes cookies
fortunes-ga - Irish (Gaelige) data files for fortune
fortunes-it - Data files containing Italian fortune cookies
fortunes-it-off - Data files containing Italian fortune cookies, offensive section
fortunes-mario - Fortunes files from Mario
fortunes-min - Data files containing selected fortune cookies
fortunes-off - Data files containing offensive fortune cookies
fortunes-pl - Polish data files for fortune
fortunes-ru - Russian data files for fortune
fortunes-spam - fortunes taken from SPAM messages
fortunes-ubuntu-server - Ubuntu server tips for fortune
安装通常您需要的fortunes-min
软件包(大约60 kB的小软件包,其中包含少量的幸运饼干)或fortunes
(大约1 MB的大软件包,其中包含15,000个以上的cookie)。
其他的则是本地化的(例如,德语或西班牙语的cookie)或仅涵盖特定主题(例如,垃圾邮件或令人反感的)。您当然可以安装多个财富包。
如果安装语言包,则这些语言包将安装在的子文件夹中,/usr/share/games/fortunes/
因此您可能需要在其数据库名称前添加前缀:
fortune -e -s es/asimov.fortunes ubuntu-server-tips
哦,别忘了:fortune
与结合使用效果最佳cowsay
!:D
$ fortune | cowsay
_____________________________________
/ A handful of patience is worth more \
\ than a bushel of brains. /
-------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||