Forrest logo
back to the a2query tool

a2query:tldr:304cf

a2query: List enabled virtual hosts.
$ sudo a2query -s
try on your machine

The command "sudo a2query -s" is used to check the currently enabled sites on an Apache server.

Here's a breakdown of the command:

  • "sudo" is a command that allows a user with administrative privileges (often called "superuser" or "root" privileges) to execute a command as another user, typically the root user. It provides elevated permissions to carry out system-level tasks.

  • "a2query" is a command used on Linux systems with Apache installed. It is specifically used to query information about Apache configuration files and modules.

  • "-s" is an option or flag used with the "a2query" command. In this case, the "-s" flag stands for "sites", indicating that we want to query information about enabled sites.

When you run the "sudo a2query -s" command, it will check the Apache configuration files and display a list of the currently enabled sites. The command requires administrative privileges (hence "sudo") because it accesses system-level configuration files.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the a2query tool