That's an interesting question, though it's moving a bit beyond our current hello.sh script editing task.
To change your default login shell, you would typically use the chsh (change shell) command. Here's how it generally works:
-
Check available shells: First, you can see which shells are available on your system by looking at the
/etc/shellsfile:cat /etc/shellsThis will list shells like
/bin/bash,/bin/zsh,/bin/sh, etc. -
Change your default shell: Then, you can use
chshand specify the path to the new shell. For example, to change your default shell to Zsh:chsh -s /bin/zsh(You might need to enter your password.)
-
Log out and back in: For the change to take effect, you usually need to log out of your current session and log back in.
Important Note for this Lab:
For the purpose of our "Hello, Bash!" lab, we're currently focused on writing a simple Bash script. The #!/bin/bash shebang line in your script ensures that this specific script will always run with Bash, regardless of your personal default shell setting. So, you don't need to change your default shell for this lab!
Let's get back to editing and saving your hello.sh file. You've already got the shebang line entered, and the next step is to add the echo 'Hello, World!' line and then save your work.