• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to verify if NX/XD is Enabled or Disabled in CentOS/RHEL 7 and 8

by admin

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:23  kernel: NX (Execute Disable) protection: active 
Note: It is a hardware feature and available in almost all the hardware, some of the hardware has this feature Enable/Disable in BIOS itself. But it is not recommended to Disable this feature.

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

Filed Under: CentOS/RHEL 7, CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. pacman Command Examples in Linux (Cheat Sheet)
  2. How to Restrict su Access to a User Only by PAM in Linux
  3. Upgrading from CentOS/RHEL 7 to CentOS/RHEL 8 using Leapp
  4. UNIX / Linux : What Is a Shell? What are different Shells?
  5. How to install and Configure VNC (TigerVNC) server in CentOS / RHEL 7
  6. killall: command not found
  7. “Device /dev/mappper/mpath25 Not Found (or Ignored By Filtering)” – error while creating physical volume with pvcreate
  8. chown: command not found
  9. dnsrecon: command not found
  10. gcal: Displays calendar

You May Also Like

Primary Sidebar

Recent Posts

  • gixy Command Examples
  • gitsome Command Examples
  • gitmoji Command Examples
  • gitlint Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright