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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

a2enmod: command not found

by admin

a2enmod is a command in Ubuntu that is used to enable Apache HTTP Server modules. It is part of the apache2-utils package, which provides utility programs for the Apache HTTP Server.

To use a2enmod, you must have administrative privileges on the system. The syntax for the command is:

a2enmod [options] module-name

Where module-name is the name of the module, you want to enable.

For example, to enable the rewrite module, you would run the following command:

$ sudo a2enmod rewrite

This will create a symbolic link from the module file to the /etc/apache2/mods-enabled directory, which tells Apache to load the module when it starts up.

You can also use a2enmod to disable a module by using the -d option. For example, to disable the rewrite module, you would run the following command:

$ sudo a2enmod -d rewrite

This will remove the symbolic link from the /etc/apache2/mods-enabled directory, effectively disabling the module.

If you encounter the below error while running the a2enmod command:

a2enmod: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install apache2
Ubuntu apt-get install apache2
Alpine apk add apache2
Kali Linux apt-get install apache2
Raspbian apt-get install apache2

a2enmod Command Examples

1. Enable a module:

$ sudo a2enmod {{module}}

2. Don’t show informative messages:

$ sudo a2enmod --quiet {{module}}

Filed Under: Linux

Some more articles you might also be interested in …

  1. Monitor HDD and SSD with smartd and smartctl
  2. logsave Command Examples in Linux
  3. CentOS / RHEL : How to restore/recover a deleted volume group in LVM
  4. How to grow/extend XFS filesytem in CentOS / RHEL using “xfs_growfs” command
  5. How to use wget to download file via proxy
  6. How to gzip all or specific files in Linux
  7. chpasswd Command Examples in Linux
  8. restorecon: command not found
  9. UNIX / Linux : How to delete root equivalent user (Non-Root User with UID 0)
  10. lsb_release Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright