ksmctl command not found

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

Introduction

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

ksmctl: command not found

or when using sudo you get the following error message

sudo: ksmctl: command not found

Solutions to ksmctl: command not found

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

In Ubuntu ksmctl is provided by ksmtuned package.

ksmtuned is:

This package ships the ksm and ksmtuned services to control Kernel Samepage Merging. KSM is a memory-saving de-duplication feature, that merges anonymous (private) pages (not pagecache ones).

While the ksm service is only able to start and stop the KSM kernel thread, ksmtuned controls and tunes KSM according to the used memory of running qemu KVM instances.

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

sudo apt-get -y install ksmtuned

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

You can also use apt command to install ksmtuned.

sudo apt -y install ksmtuned

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

sudo aptitude install ksmtuned

Summary

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