I'm using stty susp ^-
in a user's .bashrc
shell in an attempt at preventing users from using CTRL+Z to background a process.
The reason behind this, is that we have a number of users who are used to using Oracle SQLPlus on VMS, and the default editor uses CTRL+Z to save and quit the editor. CTRL+Z on Linux obviously has a completely different action, and manages to completely baffle our users as they instinctively hit CTRL+Z.
Whilst stty susp ^-
seems to work with some commands (e.g. top), it doesn't work when I really need it to, i.e. in editors such as nano
or vim
.
Can anyone suggest how I might achieve this?
Edit: I don't need to use bash
, so an alternative shell that doesn't support job control should suffice (assuming such a shell exists).
To disable suspend (Ctrl+Z) functionality in
nano
, you can putunset suspend
into the system global nanorc, which is most likely located at/etc/nanorc
. See the nanorc(5) man page for details.