• 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

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. How to Use Iperf to Test Network Performance in Linux
  2. CentOS / RHEL 5 : How to rebuild Initial Ramdisk Image
  3. How to Resize / Expand a Btrfs Volume / Filesystem
  4. CentOS / RHEL : How to disable BASH shell history
  5. CentOS / RHEL 6,7 : How to use yum history to roll back a yum update
  6. Linux OS Service ‘network’
  7. “530 Non-anonymous sessions must use encryption” – while using curl
  8. CentOS / RHEL 7 : Understanding Kexec and Kdump
  9. Command ‘df -i’ Shows ‘Inode=0’ on BTRFS File System
  10. Sample /etc/multipath.conf file

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright