2

When I type bash in to linux cli, it gives me bash-3.2$ so what does it do?

jscott
  • 24,484
  • 8
  • 79
  • 100
David
  • 1,067
  • 1
  • 10
  • 15

2 Answers2

8

When you run bash you are creating a new bash subshell within your current shell (even if your current shell was already bash), the $SHLVL environment variable will also be incremented within that new shell.

JeffG
  • 1,194
  • 6
  • 18
  • I realized that running `import subprocess; subprocess.call(['bash'])` starts a new bash subshell in your Python REPL. – bjd2385 Dec 29 '16 at 18:45
0

It's a shell - think of it like the cmd window in Windows(if that's what you're used to). It allows you to execute commands. I would have a look through the wikipedia entry as a starting point.

vsltd
  • 486
  • 2
  • 2