‘&’ just runs the command in the background.
Remember that if the running command receives an HUP interrupt (maybe you’re closing the terminal), it will be killed.
If you want the command will survive your ‘exit’, you can launch the command with the nohup
nohup ls &
‘&&’ is to concatenate two commands (AND): the second command will only run if the first command finishes successfully, that is if it sends an exit code of 0.
command1 && command2
‘||’ is to concatenate two commands (OR): the second command will only run if the first one fails in some way (exit code is not 0; the command exited with an error).
command1 || logErrorAndExit1
‘;’ is to concatenate two commands: the second command will start right after the first one finishes, no matter whether it succeeds or not.
command1 ; command2