checksec command not found

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

Introduction

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

checksec: command not found

or when using sudo you get the following error message

sudo: checksec: command not found

Solutions to checksec: command not found

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

In Ubuntu checksec is provided by checksec package.

checksec is:

Modern Linux distributions offer some mitigation techniques to make it harder to exploit software vulnerabilities reliably. Mitigations such as RELRO, NoExecute (NX), Stack Canaries, Address Space Layout Randomization (ASLR) and Position Independent Executables (PIE) have made reliably exploiting any vulnerabilities that do exist far more challenging. The checksec.sh script is designed to test what standard Linux OS and PaX security features are being used.

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

sudo apt-get -y install checksec

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

You can also use apt command to install checksec.

sudo apt -y install checksec

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

sudo aptitude install checksec

Summary

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