I tested freeBSD in a virtual machine on my Linux pc, and I kinda like it. I noticed that the file structure is similar to that of Linux, and many Linux commands will also work on freeBSD. My question is that will my programs that I made for Linux run on freeBSD? They are mainly written in c++ (which would be pre-compiled on Linux) with a few bash scripts (.sh)? .They are all console programs. Also, does freeBSD ship with the BASH shell by default? Thank you in advance!!
You are asking multiple questions here.
FreeBSD can run Linux programs without recompiling, you would have to test yours. See https://www.freebsd.org/doc/handbook/linuxemu.html
Now, I would recompile them on FreeBSD and see if they work - if you can get them compiled without FreeBSD compiler/linker complaining there are good chances they will just work.
As for "any Linux commands will also work on freeBSD."
Watch out, here, FreeBSD sed is not quite the same as GNU sed, for example. A lot of programs have small differences when it comes to behavior/parameters. Besides, with "Linux commands" you mean "Unix tools".
For other readers, the Unix tools on FreeBSD are much more similar to the Unix tools on Darwin (aka Mac OS X).