I'm running Ubuntu 16.04 and bash keeps putting '@' in front of my prompt, regardless of the value set in ~/.bashrc.

I've tried setting different values both in the ~/.bashrc file and from within the terminal using the export command.

For example, this is a segment of my terminal:

@$ export PS1='HELLO '

I even tried reverting back to the original ~/.bashrc , but with no success because that @ is still there in every line.

  • Is there a way to get rid of it?
  • Is there another configuration file I should be looking at?
  • Is it a bug that I should report?
  • Is there any $PROMPT_COMMAND?
    – choroba
    May 3, 2016 at 21:33
  • @choroba nope, undefined
    – Dziugas
    May 3, 2016 at 21:34
  • Call set -x command to debug the command line. Basically it should show what is being executed each time. To stop it, run set +x Let us know if that reveals anything. Clearly you have something set somewhere, maybe /etc/bash_bashrc . . . Can recall if that's correct file or not off the top of my head May 3, 2016 at 21:47
  • @Serg set -x did not reveal any hidden commands and searching for PS1 or PROMPT_COMMAND in /etc/bash.bashrc did not return any results.
    – Dziugas
    May 3, 2016 at 22:19

1 Answer 1


You appear to have configured readline to enable edit mode indication. From 8.3.1 Readline Init File Syntax of the Bash Reference Manual:

show-mode-in-prompt (Off)
       If set to On, add a character to the  beginning  of  the  prompt
       indicating  the  editing  mode:  emacs (@), vi command (:) or vi
       insertion (+).

You should be able to disable it in the current shell using

bind 'set show-mode-in-prompt off'

To disable it persistently, you will need to find where it is getting set, possibly your ~/.inputrc or /etc/inputrc files.

  • thanks, this fixed it for me. I had the ~/.inputrc set to on. Switched to off, no more @ prepended to $PS1
    – ficestat
    Aug 30, 2023 at 16:49

You must log in to answer this question.

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