Operations 5 min read

Add Random Inspirational Quotes to Your Linux Terminal with motivate & fortune

This guide walks you through installing the ‘motivate’ and ‘fortune’ command‑line tools on Debian‑based and RPM‑based Linux distributions, configuring them to display random motivational or witty quotes each time you open a terminal, and shows how to keep them updated.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Add Random Inspirational Quotes to Your Linux Terminal with motivate & fortune

This article provides a step‑by‑step tutorial for installing and using the motivate and fortune command‑line utilities, which display random motivational or witty quotes in a Linux terminal.

Prerequisites

Ensure that git and python3 are installed. Most modern Linux distributions include them by default; otherwise install them with the appropriate package manager. $ sudo apt-get install git python3 For other distributions use the corresponding installer.

Install motivate

Clone the repository, enter the source directory, and run the provided install script.

$ git clone https://github.com/mubaris/motivate.git
$ cd motivate/motivate
$ sudo ./install.sh
$ source ~/.bashrc   <!-- for bash users -->

If you use zsh, replace ~/.bashrc with ~/.zshrc in the last command.

Using motivate

After installation, execute motivate (or the shortcut moti) to display a random inspirational quote.

$ motivate
$ moti
"You don't have to be great to start, but you have to start to be great."
        -- Zig Ziglar

Updating motivate

Periodically pull the latest version and run the update script to keep the tool current.

$ git clone https://github.com/mubaris/motivate.git
$ cd motivate
$ ./UPDATE

Install fortune

Install the fortune package using your distribution's package manager.

# RPM‑based systems
$ sudo yum install fortune
# DEB‑based systems
$ sudo apt-get install fortune

Using fortune

Run fortune to display a random witty saying.

$ fortune
fortune output
fortune output

Automatic display on terminal start

Add the commands to your shell’s startup file ( ~/.bashrc or ~/.zshrc) so that a quote appears each time a new terminal session begins.

# For motivate
motivate
# For fortune
fortune

Source the file to apply the changes: $ source ~/.bashrc # or source ~/.zshrc Now every new terminal window will greet you with a random motivational or witty quote.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ShellTutorialcommand-linefortunemotivate
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.