Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

What's the difference between bash reserved words and built-in commands?

Can I disable bash's time, and use /usr/bin/time? If not, how can I format its output?

share|improve this question
There is actually an environment variable: TIMEFORMAT that specifies the output of time. – TheoYou Jun 23 '11 at 14:18
up vote 9 down vote accepted

Most reserved words are commands that are built into bash; if you want to use an executable that has the same name as a reserved word then either specify the full path to the executable, or escape the command with a backslash.

$ time

real    0m0.000s
user    0m0.000s
sys 0m0.000s
$ \time
Usage: time [-apvV] [-f format] [-o file] [--append] [--verbose]
       [--portability] [--format=format] [--output=file] [--version]
       [--help] command [arg...]
$ then
bash: syntax error near unexpected token `then'
$ \then
bash: then: command not found

Also, BASH FAQ #32: "How can I redirect the output of 'time' to a variable or file?".

share|improve this answer
Thanks, the backslash is really tricky. – TheoYou Jun 23 '11 at 14:02
Strictly speaking, reserved words aren't necessarily commands at all, as your example even demonstrates. – JdeBP Jun 23 '11 at 16:28

You can use builtin <cmd> and command <cmd> to force calling a bash built-in or an external command.

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.