The fortune command is used to output a random quote or aphorism. It is often used to add some variety to normal terminal operations.
fortune
The output of the command is a random quote or aphorism, which can be comic, philosophical, or otherwise.
The s
option tells the utility to generate quotes of small size.
You can use cowsay to output the quote:
fortune | cowsay
To install fortune command in Ubuntu, you can follow these steps:
Open a terminal.
Update the package list with the command:
sudo apt update
Install the fortune program using the command:
sudo apt install fortune-mod
Once the installation is complete, the fortune command will be available for use.
After installation, you can use the fortune command to output random quotes and aphorisms in the terminal. You can redirect the output of the command to a file or use it with other commands to create interesting effects.