Just entering the name of the shell script won’t work since the shell would assume that homestead.sh
is a global command. By preceding it with ./
you’re explicitly telling the shell that you want to execute a certain file in the current directory – another option would be sh homestead.sh
.
Yes, you’re only cd
ing within the script. This doesn’t change your actual working directory in the shell.