Skip to main content
no need to use any external commands, especially since `tty` can fail even if the stdin is a tty: unshare -m sh -c 'mount -t devpts - /dev/pts; tty; stty'
Source Link
user313992
user313992

As others have mentioned, the required fix is adding stty -ixon to your ~/.bashrc file. However, it should be protected from execution by non-interactive shells:

if tty[[ -st &&0 echo&& "$$-" | grep= -q*i* i]]
then
    stty -ixon
fi 

This should avoid errors when there is no TTY or interactive session in the first place, so "internal" shell invocations of desktop environments etc. will not cause error messages.

As others have mentioned, the required fix is adding stty -ixon to your ~/.bashrc file. However, it should be protected from execution by non-interactive shells:

if tty -s && echo "$-" | grep -q i
then
    stty -ixon
fi

This should avoid errors when there is no TTY or interactive session in the first place, so "internal" shell invocations of desktop environments etc. will not cause error messages.

As others have mentioned, the required fix is adding stty -ixon to your ~/.bashrc file. However, it should be protected from execution by non-interactive shells:

if [[ -t 0 && $- = *i* ]]
then
    stty -ixon
fi 

This should avoid errors when there is no TTY or interactive session in the first place, so "internal" shell invocations of desktop environments etc. will not cause error messages.

Source Link
telcoM
  • 114.1k
  • 4
  • 163
  • 311

As others have mentioned, the required fix is adding stty -ixon to your ~/.bashrc file. However, it should be protected from execution by non-interactive shells:

if tty -s && echo "$-" | grep -q i
then
    stty -ixon
fi

This should avoid errors when there is no TTY or interactive session in the first place, so "internal" shell invocations of desktop environments etc. will not cause error messages.