Artificial intelligent assistant

Why does my su start in background? When I use `su - fred` the job is immediately moved to the background. Then, if I use `fg` it works normally: wally@Machine:~$ su - fred Password: [1]+ Stopped su - fred wally@Machine:~$ fg su - fred fred@Machine:~$ Why did it start in the background? * * * Output of `type -a su` (run as wally): su is /usr/bin/su su is /bin/su * * * Output of `jobs -l` (run as wally): [1]+ 9187 Stopped (signal) su - fred * * * fred's startup file (`.profile` and `.bashrc` were deleted): `.bash_profile` exec env /bin/bash * * * I found a related question here.

That happens because bash runs the startup files with job control disabled.

Add `set -m` at the beginning of your `~/.bash_profile`.

See also this answer.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 23fff8b595d8a4fa85082ba8c1df88be