Changing control keys (stty command)

To change the keys that your terminal uses for control keys, use the stty command.

Your changes to control keys remain in effect until you log out. To make your changes permanent, place them in your .profile file.

See the following examples:
  • To assign Ctrl-Z as the interrupt key, type the following:
    stty intr ^Z
    Be sure to place a space character between intr and ^Z.
  • To reset all control keys to their default values, type the following:
    stty sane
  • To display your current settings, type the following:
    stty -a