xscreensaver command not found

In this troubleshooting guide we learn how to fix xscreensaver command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

xscreensaver: command not found

or when using sudo you get the following error message

sudo: xscreensaver: command not found

Solutions to xscreensaver: command not found

How To Fix xscreensaver: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu xscreensaver is provided by xscreensaver package.

xscreensaver is:

XScreenSaver is a modular screen saver and locker for X11, containing more than 200 screen savers.

This package includes the bare minimum needed to blank and lock your screen. Install this package if you want to use the xscreensaver engine to control screen blanking and launching display modes (“hacks”). If you only want to use other screensaver engines, you don’t need to install this package.

The graphical display modes are in the xscreensaver-data, xscreensaver-data-extra, xscreensaver-gl and xscreensaver-gl-extra packages.

To fix this problem, we can install more using the command below.

sudo apt-get -y install xscreensaver

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install xscreensaver.

sudo apt -y install xscreensaver

Or if you have aptitude installed you can use the following command.

sudo aptitude install xscreensaver

Summary

In this tutorial we learn how to fix xscreensaver command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.