NX stands for No eXecute and XD stand for eXecute Disable is a technology used in processors to prevent the execution of certain types of code. NX/XD is a hardware cpu feature which is provided in almost all the hardware. Some BIOS has an advanced option of enabling or disabling it. This post will help to check NX/XD the feature is enabled or disabled.
Use the following command to check the status of NX/XD from the OS level.
For example:
1. From dmesg command:
# dmesg | grep "Execute Disable" [ 0.000000] NX (Execute Disable) protection: active
2. From journaltcl command:
# journalctl -b | grep 'Execute Disable' Dec 31 14:30:23kernel: NX (Execute Disable) protection: active
Conclusion
NX stands for No eXecute and XD stands for eXecute Disable. Both are the same and are a technology used in processors to prevent the execution of certain types of code. You can also use /var/log/messages file and dmesg command to check if this feature is enabled.
For example:
# cat /var/log/messages | grep "Execute Disable" [ 0.000000] NX (Execute Disable) protection: active
# dmesg | grep "Execute Disable" [ 0.000000] NX (Execute Disable) protection: active