Why is my Linux system repeating every command that I type?

It looks like you have -v set (something is running set -v).

To reverse this, run set +v.

set [--abefhkmnptuvxBCEHPT] [-o option-name] [arg ...]
set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...]
       Without  options, the name and value of each shell variable are displayed in a
       format that can be reused as input for setting or resetting the currently-set
       variables. Read-only variables cannot be reset. In posix mode, only shell
       variables are  listed. The output is sorted according to the current locale.
       When options are specified, they set or unset shell attributes. Any arguments
       remaining after option processing are treated as values for the positional
       parameters and are assigned, in order, to $1, $2, ...  $n.  Options, if
       specified, have the following meanings:

[...]

-v      Print shell input lines as they are read.

See the bash manpage (under the "Shell Builtin Commands" section) for more information on the set built-in command.

Alternatively run help set from within bash for more direct access to the help text.


At least on Bash 4.3, this command has a similar effect to set -v:

trap 'echo "$BASH_COMMAND"' DEBUG

To check if this affects you, run

trap -p DEBUG

To unset it, run

trap - DEBUG