VOOZH about

URL: https://itsfoss.com/notification-terminal-command-completion-ubuntu/

⇱ Get Notification For Terminal Command Completion In Ubuntu


👁 Ghostboard pixel

Get Notification For Terminal Command Completion In Ubuntu

Abhishek Prakash
3 min read

Whenever I work on something in the terminal that takes time to complete, it is quite common get distracted in the meantime. This is because there’s no notification reminding you about the command that were working with in the terminal, even if it was just a simple system update.

However, there are two ways with which you can get notified when a command completes in your terminal.

You can utilize Noti or simply libnotify-bin package (from the default repository) to get notified.

While this could be a default feature in elementary OS, you can utilize these both methods in Ubuntu (and any other flavors) or any other Linux distribution.

Get desktop notification for command completion in Ubuntu

In my opinion, using Noti is easier and quicker. The second method also works quite well but may not be user-friendly to type every time you work with commands.

Method 1: Using Noti

To get started, you need to install Noti first.

Unfortunately, there’s no package to install nor an easy way to uninstall, let me show you what you can do to set it up.

You need to first download the archive for Linux from its GitHub releases page. Once done, extract it to your home directory or anywhere you like.

Next, to get it installed, make sure you’re in the directory where you have it extracted and then type in:

sudo install noti*linux-amd64/noti /usr/local/bin

Now, all you need to do is type “noti” before any command that you want to be notified about. For instance:

noti sudo apt update

And, you will see something like this:

To remove Noti, you need to navigate to the usr/local/bin directory and remove it manually using commands or the GUI as root.

The commands to do that are:

cd /usr/local/bin
sudo rm Noti

Method 2: Using libnotify-bin package

You should be able to find this package in your default repositories. So, you can easily install it by typing:

sudo apt install libnotify-bin

If you’ve already have it installed, you’re in luck. Now, all you have to do is type “notify-send MESSAGE” after any command you type.

But, make sure to separate it after the command using a semicolon (;)

Here’s how it looks like:

sudo apt update; notify-send Done

You can easily replace “Done” with any text you like and even with a special character like an exclamation mark !

Wrapping Up

Even if you are not a programmer, you might find it handy while installing an application via PPA or just updating or upgrading the system. The apt update command might take some time to run, depending upon available updates and your network speed, so that could use a reminder.

I hope you find this little tool useful in your desktop Linux experience with terminal notification. In other terminal trick, you can change sudo password time period. If you have questions or suggestion, feel free to drop a comment.

About the author

Abhishek Prakash

Created It's FOSS 13 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Read next

How to Install Unity Desktop on Arch Linux

Battle of the Texts and the Unicode Savior

Monica: An Open-Source App for Personal Relationship Management

5 NeoVim GUI Editors You Could Try If You are Not a Total Terminal Junkie

Rnote: An Open-Source Drawing App for Notes and Annotation

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

👁 itsfoss happy penguin