run in background linux bash code example
Example 1: linux run background
nohup ./myscript.sh & # runs in background
nohup ./myscript.sh # output is in nohup.out
nohup ./myscript.sh > myscript.log & # output is in myscript.log
Example 2: bash run in background
# To run a command in the background, you can add & after a command.
# When this happens, there will be output to the terminal that shows
# the process ID of the command.
# Example:
conky & # This runs conky in the background (I have no example ideas)