The tag has no wiki summary.

learn more… | top users | synonyms

69
votes
6answers
36k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
23
votes
4answers
2k views

What's the difference between running a program as a daemon and forking it into background with '&'?

What are the practical differences from a sysadmin point of view when deploying services on a unix based system?
13
votes
7answers
28k views

Execute remote commands, completely detaching from the ssh connection

I have 2 computers, localpc and remoteserver. I need localpc to execute some commands on remoteserver. One of the things it needs to do is start a backup script that runs for a number of hours. I ...
3
votes
3answers
100 views

Log to multiple files while process in background (nohoup)

I have bash script that logs to two log files in parallel. echo "$(date) | [STATE] Activating IP forwarding" >> $logsPath$logFileName echo $(date +"%Y-%m-%d %H:%M")","$previousState >> ...
19
votes
2answers
22k views

How to suspend and bring a background process to foreground

I have a process originally running in the foreground. I suspended by Ctrl+Z, and then resume its running in the background by bg <jobid>. I wonder how to suspend a process running in the ...
8
votes
3answers
231 views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
2
votes
2answers
56 views

What environment and credential is used by startup, background and service processes

Startup scripts (on boot) Processes running in (or sent to) the background (when using SSH -fN for example) Services etc... What $path variable will they be using? What credentials? Anything else I ...
2
votes
5answers
1k views

How to start a program in the background

The program Boblight does not run in background. There is no noticeable difference between executing sudo boblightd and sudo boblightd& How can I solve this problem that the console will ...
0
votes
2answers
1k views

ssh + nohup does not work

I'm trying to run a program over SSH that keeps running when I disconnect. This Stack Overflow answer gave me the following command: nohup sleep 30 > foo.out 2> foo.err < /dev/null & ...
4
votes
1answer
476 views

Is there a way to temporarily change the terminal colour?

I use the gnome-terminal and most of my editors with a white on black theme as I find its easier on the eyes. One of my labs requires screenshots of the terminal (with the process) to be submitted ...
8
votes
3answers
972 views

How do you send command line apps directly to the background?

I already know that pressing ctrl+z stops the app, then I can send the app to background with the bg command, but that means there is a brief preiod of time that the app is stopped. How do I send the ...
5
votes
6answers
962 views

Run a command without making me wait

On the CLI, sometimes a command I type takes a while to complete, and sometimes I know when that's about to happen. I'm a bit confused on "backgrounding" and such in Linux. What is the most common ...
2
votes
1answer
387 views

Is it possible to customise the prompt to show the if there are any background jobs?

Is it possible to customise the bash prompt to show the if there are any background jobs? I find it easy to forget that there are background jobs. Say if the prompt was... $ Is there a way to ...