Ubuntu: How do I find the version of bash I am running?
Channel: Roel Van de Paar
Date: 2019-06-11

Ubuntu: How do I find the version of bash I am running?


Question: (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.

Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):

== This solution helped 156 people ==
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.

== This solution helped 1 person ==
The usual --version may give you too much multi-line boilerplate so what I am
using is
bash -c 'echo $BASH_VERSION'

== This solution helped 34 people ==
There's a key shortcut that instructs current shell information to show up:
Ctrl+x Ctrl+v
From man bash
 display-shell-version (C-x C-v)
Display version information about the current instance of bash.
This is the best choice if you have messed with environment variables.

== This solution helped 8 people ==
No, everything is alright. From man bash:
 --verbose
Equivalent to -v.
It is just not as silent as usual. Try
--version
instead.

With thanks & praise to God! With thanks to all the many who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music & music license: https://www.bensound.com/royalty-free-music | Images & images license: https://stocksnap.io/license and others | With thanks to user Zabba (https://askubuntu.com/users/6069), user vegatripy (https://askubuntu.com/users/396708), user user unknown (https://askubuntu.com/users/10068), user sorin (https://askubuntu.com/users/1004), user Paweł Nadolski (https://askubuntu.com/users/4231), user MD XF (https://askubuntu.com/users/599678), user Jorge Castro (https://askubuntu.com/users/235), user Jamal Fanaian (https://askubuntu.com/users/16084), user Flimm (https://askubuntu.com/users/2355), and the Stack Exchange Network (http://stackoverflow.com/questions/39309). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.