Lists the domains in the specified directory.


asadmin [asadmin-options] list-domains [--help]
[--domaindir domaindir]


The list-domains subcommand lists the domains in the specified domains directory. If the domains directory is not specified, the domains in the default directory are listed. If there is more that one domains directory, the --domaindir option must be specified. The status of each domain is included.

This subcommand is supported in local mode only.



Options for the asadmin utility. For information about these options, see the asadmin help page.


Displays the help text for the subcommand.


The directory where the domains are to be listed. If specified, the path must be accessible in the files stem. If not specified, the domains in the domain root directory are listed. The default location of the domain root directory is as-install/domains.


Displays detailed information about the administration servers in the listed domains, including host names and port numbers. The default value is false.


Specifies whether a header is displayed when the --long option is used. The default value is true. To suppress the header, set the --header option to false.


Example 1 Listing Domains

This example lists the domains in the default directory.

asadmin> list-domains
Name: domain1 Status: Running
Name: domain2 Status: Not running
Name: domain4 Status: Running, restart required to apply configuration changes
Command list-domains executed successfully

Exit Status


subcommand executed successfully


error in executing the subcommand

See Also