• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

notify-send Command Examples in Linux

by Deepika

notify-send is a command-line tool that is used to send desktop notifications on Linux systems. It utilizes the current desktop environment’s notification system to display a notification to the user. The tool can be used to display a notification with a custom message and title. It supports several options, such as setting the urgency level of the notification, adding an icon to the notification, or specifying the time the notification should display.

notify-send works with most popular desktop environments, including Gnome, Unity, KDE, and Xfce. By using the notification system provided by the desktop environment, notify-send ensures that notifications are displayed consistently across different applications, and that they follow the user’s notification preferences.

For example, to display a notification with the message “This is a test message” and the title “Test notification”, you would run the following command:

# notify-send "Test notification" "This is a test message"

notify-send Command Examples

1. Show a notification with the title “Test” and the content “This is a test”:

# notify-send "Test" "This is a test"

2. Show a notification with a custom icon:

# notify-send -i icon.png "Test" "This is a test"

3. Show a notification for 5 seconds:

# notify-send -t 5000 "Test" "This is a test"

4. Show a notification with an app’s icon and name:

# notify-send "Test" --icon=google-chrome --app-name="Google Chrome"

Filed Under: Linux

Some more articles you might also be interested in …

  1. nmcli connection Command Examples in Linux
  2. CentOS / RHEL : How to configure iptable rules to allow FTP ports 20/21
  3. cryptsetup Command Examples in Linux
  4. Rabbitmq install and management
  5. pacman Command Examples in Linux (Cheat Sheet)
  6. sudo Command Examples in Linux
  7. Volume “test_vg/lvol0” is not active locally – Error while running lvcreate
  8. Understanding How an Email System Works
  9. pgrep: command not found
  10. How to verify the integrity of a file with md5 checksum

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright