Bash – How to Find the Version of Bash Running

bashcommand line

(learning bash)
I was trying to check the bash version so I typed /bin/bash -v.

That outputted a whole lot of text to the screen (contents of .bashrc, and other files sourced from it).

Could I have screwed up something (like overwriting some config files/setting incorrect environment variables etc.) due to that command?

I also can't find documentation on what the -v switch is for.

Best Answer

The -v parameter for bash stands for verbose, and instructs bash to print out as much information as possible about what it is doing. On startup, it will print out all the configuration it is reading in.

To print out the version information for bash, use bash --version.