Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 want a process to just NOT print its stdout or stderr output.
I know that I can do something like
program >output.txt 2>errors.txt and then rm output.txt errors.txt but its not elegant.
I want that they should not at all be stored anywhere in the first place.
Any idea how to do so?

share|improve this question

Just run it as program >/dev/null 2>&1

share|improve this answer

If you never want it to output stdout or stderr (much like how I have it set up for my Kate text editor) you can add the following line to your ~/.bashrc:

alias kate='kate 2>/dev/null 1>/dev/null'

Just replace kate with the needed program, and you should be good to go.

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.