memlockd command not found

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

Introduction

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

memlockd: command not found

or when using sudo you get the following error message

sudo: memlockd: command not found

Solutions to memlockd: command not found

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

In Ubuntu memlockd is provided by memlockd package.

memlockd is:

When a system starts paging excessively it may be impossible for the sysadmin to login for the purpose of killing the runaway processes (sometimes the login program times out due to thrashing). Memlockd allows important system files (such as /bin/login, /bin/getty, and the admin shell) to be locked in memory so that there will be no delay in accessing executable pages. In my tests this can decrease the time required for the administrator to login on a thrashing system by a factor of more than 3.

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

sudo apt-get -y install memlockd

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

You can also use apt command to install memlockd.

sudo apt -y install memlockd

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

sudo aptitude install memlockd

Summary

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