Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 have some commands replaced with * in the bash history, e.g.

1094  apt-get update
1096  dpkg -i /var/cache/apt/archives/libssl1.0.0_1.0.0h-1_amd64.deb

How to prevent this?

share|improve this question

Looks like mark-modified-lines is enabled in your shell. Try disabling it in ~/.inputrc:

set mark-modified-lines Off

Details in man bash.

share|improve this answer
weird, bind -V | grep mark-modified-lines tells me it's set to off – eugene y Apr 11 '12 at 12:03

1) Put set revert-all-at-newline on in your ~/.inputrc
2) Reread initfile (C-x C-r in Emacs-mode)
3) Type history

help history says:

Display the history list with line numbers, prefixing each modified
entry with a `*'.

LESS=+/revert-all-at-newline man bash says:

revert-all-at-newline (Off)
          If set to On, readline will undo all changes  to  history  lines
          before returning when accept-line is executed.  By default, his-
          tory lines may be modified  and  retain  individual  undo  lists
          across calls to readline.

revert-all-at-newline works fine since bash-4.3.30. Changes:

Fixed a bug that caused effects made by undoing changes to a history line to
be discarded.

mark-modified-lines is unrelated to a history output.

    If  set  to  On,  history lines that have been modified
    are displayed with a preceding asterisk (*).

What does it mean?
1) Add set mark-modified-lines on to ~/.inputrc
2) Reread initfile (C-x C-r in Emacs-mode)
3) Type echo a<ENTER>
4) Type <UP>-arrow key
5) Press Z (you should see *<PS1> echo aZ)
6) Press C-_ (you shouldn't see *)

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.