By default, console commands run in the dev environment and you may want
to change this for some commands. For example, you may want to run some commands
in the prod environment for performance reasons. Also, the result of some commands
will be different depending on the environment. For example, the cache:clear
command will clear and warm the cache for the specified environment only. To
clear and warm the prod cache you need to run:

1

$ php app/console cache:clear --env=prod

or the equivalent:

1

$ php app/console cache:clear -e prod

In addition to changing the environment, you can also choose to disable debug mode.
This can be useful where you want to run commands in the dev environment
but avoid the performance hit of collecting debug data:

1

$ php app/console list --no-debug

There is an interactive shell which allows you to enter commands without having to
specify php app/console each time, which is useful if you need to run several
commands. To enter the shell run:

1
2

$ php app/console --shell
$ php app/console -s

You can now just run commands with the command name:

1

Symfony > list

When using the shell you can choose to run each command in a separate process: