Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was using & in cshell in the end of a command, in order to execute the command as an independent process from the terminal:

kate filename.txt&

How I should do this in bash?

share|improve this question

The same way. From bash(1):

 If  a  command  is terminated by the control operator &, the shell exe-
 cutes the command in the background in a subshell.  The shell does  not
 wait  for  the command to finish, and the return status is 0.
share|improve this answer

Using & will background the job, but it is still tied to the shell.

The difference you may find between csh and bash with & is with regard to redirecting STDERR.

In csh:

    kate filename.txt >& kateout.log

In bash:

    kate filename.txt > kateout.log 2>&1

If you want the process to survive the parent shell/terminal closing, try "nohup" i.e.:

    nohup kate filename.txt > kateout.log 2>&1

The redirect is optional; if there is output it will go to nohup.out in the current working directory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.