You are in: > Home > Systems Administration
FreeBSD : Adding fortunes to appear after MOTD
The program 'fortune', which is often called in the .login file by default, has a nice collection of FreeBSD tips. You can access this a couple of ways:
$ /usr/games/fortune freebsd-tips
will print a single tip to your screen, while
$ /usr/games/fortune -m col freebsd-tips | less
will dump all the tips that contain the sequence 'col' to your screen. This will show you the nice short way using the col command to strip DOS End Of Line characters from your files (those are the ones that look like ^M in many places):
To get a fortune to appear when you login to your computer add the following line to the end of your .login file in your home directory
[ -x /usr/games/fortune ] && /usr/games/fortune freebsd-tips
If you do not already have fortune installed on your computer, you can install it by doing the following:
- Running sysinstall
- Selecting Configure
- Selecting Distributions
- Selecting Games
Then installing games from your preferred medium.
Related articles
- SSH Tunnels - [18th Feb 2008]
- FreeBSD : Adding fortunes to appear after MOTD - [03rd May 2007]
- FreeBSD : Adding users and groups - [03rd May 2007]
- Linux File Permissions - [05th Jan 2006]
- System Administration Tasks - [16th Dec 2005]
- Systems Adminstrators Knowledge - [16th Dec 2005]
- Managing Hardware and Software - [16th Dec 2005]
- Users - [16th Dec 2005]
- Systems Administration Introduction - [16th Dec 2005]







