I just typed bash
in Ubuntu's terminal and, it was like normal. But after that, I had to type exit twice. What is bash
command in bash?
Ubuntu – ‘bash’ command in bash
bashcommand line
bashcommand line
I just typed bash
in Ubuntu's terminal and, it was like normal. But after that, I had to type exit twice. What is bash
command in bash?
Best Answer
There is a difference between shells and terminal emulators.
Shell is a thing that passes your commands to the kernel, and that is executed. And terminal emulator programs let you interact with the shell. Examples of Terminal emualtors are
gnome-terminal
,konsole
and shells arebash
,zsh
,sh
etc. Terminal emulators are simply named as Terminal in most desktop environments.When you open Terminal, it uses a shell by default. For most terminals it is
bash
. You can change the default shell. First runwhoami
to get your user name. Then runcat /etc/passwd | grep user_name
whereuser_name
is your user name. The last word is your default shell. Now you can change your shell withsudo usermod --shell /bin/shell_name user_name
.Also when you type
bash
it just opens another shell. You can simply exit the other shell by runningexit
. Such as executingzsh
orsh
will take you to other shell. You can read the man pages of shell withman shell_name
to learn the differences between shells. However the man pages are extremely large and complicated to read that it will make your head spin. Executing aman shell_name | wc -l
will give you the line count.Hope that helps