$ echo $BASH_VERSION 4.2.25(1)-release # Just the Major version: echo $BASH_VERSINFO 4 #### $ bash --version GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. #### GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)