This is more of a general Linux question, but from the manpage of bash
(likely your shell):
If a command is terminated by the control operator &, the shell executes the command in the background in a subshell. The shell does not wait for the command to finish, and the return status is 0.
In other words: adding the '&' allows you to continue to use the terminal, while roscore
is running in the background. If you did not add the '&', roscore
would start and all input (into the terminal window) would be directed to roscore
. You'd need a second terminal to do your work in.
For reference: man bash
.