Ubuntu – Ctrl+C Not Working in GNOME Terminal

gnome-terminalkeyboard shortcutssignalsUbuntu

On my Linux host, Ctrl+C does not seem to work and I do not know how to proceed to make it work. I am using Ubuntu 10.04 with bash 4.1.5(1), and working in Gnome-terminal.

When I pressed Ctrl+C while this script was running, it did not cause it to quit.

#!/bin/bash
for i in `seq 500`
do
        ps -e > /dev/null
        echo $i
done

Best Answer

Try to do this

$ stty sane

and see if it fixes the problem, also check if the intr is set correctly using

$ stty -a

If you find that intr is set to something different than ^C, then you can also fix it by typing

$ stty intr ^v^c
Related Question