• 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

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. zypper: command not found
  2. fisher: Fisher, a fish-shell plugin manager
  3. reportbug: command not found
  4. ntpq: command not found
  5. “docker system” Command Examples
  6. mkfs.btrfs: command not found
  7. diff: command not found
  8. dvc gc: Remove unused files and directories from the cache or remote storage
  9. “git credential” Command Examples
  10. CentOS / RHEL : How to collect sosreport

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright