Laravel env() or config() to get environment variable on command line

You can run Tinker:

php artisan tinker

And then use any of these commands:

env('SESSION_DRIVER')
config('session.driver')

Tinker allows you to interact with your entire Laravel application on the command line, including the Eloquent ORM, jobs, events, and more.

https://laravel.com/docs/5.5/artisan#introduction

Alternatively, you could create an Artisan command to show you a value from a config file:

php artisan show-config-value session.driver

You can run the artisan command in CMD or terminal, which displays the current environment the application is executing

php artisan env