Super User is a question and answer site for computer enthusiasts and power users. 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

My guess from the working of it is that it suppresses the output of the command

share|improve this question
up vote 2 down vote accepted

It suppresses the command entirely.

You use it commonly in batch files to either add a comment to your code (explaining to the reader what is going on) or stop a line from running - for example:

# Tell the user the results 
cat $HOME/.temp/results.txt

# This next line doesn't work
# cat $HOME/.temp/next.txt

The equivalent in DOS is to prefix the line with REM.

share|improve this answer

On the command line it's just a comment. Nothing happens.

#mkdir temp  -> yields nothing.

In a script:




has a special meaning to indicate the interpreter.

Otherwise it's used to comment out the line.

share|improve this answer
For the sake of completeness, a Wikipedia article on shebang (the #! sequence). – gronostaj Oct 17 '13 at 7:12
I think you mean "interpreter", not "interrupter" :) – FreudianSlip Oct 17 '13 at 7:48

It makes bash (assuming that's what you are using) and most other shells view that line as a comment, therefore, "running it" does nothing.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .