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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to resolve the error “-bash: xclock: command not found” in CentOS / RHEL

by admin

xclock is a handy tool to test if the DISPLAY variable is set properly and you can get a GUI based clock on running the “xclock” command as shown below. The package xorgs-x11-apps provides the xclock command.

xclock command not found linux CentOS RHEL

Installing the package providing the xclock command

1. Check the package which provides the binary, using below command:

# yum whatprovides xclock
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.cisp.com
 * epel: mirror.cogentco.com
 * extras: mirror.cs.vt.edu
 * nux-dextop: li.nux.ro
 * updates: mirror.vtti.vt.edu
xorg-x11-apps-7.7-7.el7.x86_64 : X.Org X11 applications
Repo        : base
Matched from:
Provides    : xclock

2. As you can see in the output above, the package xorgs-x11-apps provide the xclock command. To install the xorg-x11-apps package run the below command.

# yum install xorg-x11-apps
...
===================================================================================================================================================================
 Package                                    Arch                                Version                                    Repository                         Size
===================================================================================================================================================================
Installing:
 xorg-x11-apps                              x86_64                              7.7-7.el7                                  base                              307 k
Installing for dependencies:
 libXaw                                     x86_64                              1.0.13-4.el7                               base                              192 k
 libXpm                                     x86_64                              3.5.12-1.el7                               base                               55 k
Transaction Summary
===================================================================================================================================================================
Install  1 Package (+2 Dependent packages)
Total download size: 554 k
Installed size: 1.3 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): libXpm-3.5.12-1.el7.x86_64.rpm                                                                                                       |  55 kB  00:00:00     
(2/3): xorg-x11-apps-7.7-7.el7.x86_64.rpm                                                                                                   | 307 kB  00:00:00     
(3/3): libXaw-1.0.13-4.el7.x86_64.rpm                                                                                                       | 192 kB  00:00:01
...

Filed Under: Linux

Some more articles you might also be interested in …

  1. doctl auth: Authenticate doctl with one or more API tokens
  2. groupadd Command Examples in Linux
  3. ac Command Examples in Linux
  4. git hash-object: Computes the unique hash key of content and optionally creates an object with specified type
  5. “docker ps” Command Examples
  6. btrfs scrub Command Examples in Linux
  7. How to allow ssh with empty passwords in Linux
  8. screenkey Command Examples in Linux
  9. pacman –deptest Command Examples
  10. base32 Command Examples (Encode or decode file or standard input to/from Base32, to standard output)

You May Also Like

Primary Sidebar

Recent Posts

  • “glab pipeline” Command Examples
  • “glab mr” Command Examples
  • “glab mr merge” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright