RHEL 7: Backup Space and Delete is not working in console

Hi All,

During my virtual machine power on i have rc3.d script to accept user inputs like IP address. This script gets executed during first time boot up. It was working fine till my VM is using RHEL6.5. Now we migrated to RHEL 7 environment. While accepting the user inputs in console, I am not able to use delete and backspace key.

Below is my new service script looks.

sample.service:

/etc/init.d/firstboot:

Thanks,
Kalpeer

On most UNIX systems, the default erase character (the character you use to delete the previous character typed) and kill character (the character you use to delete everything you have typed so far on the current input line) are # and @ , respectively. I don't know what they are on various Red Hat releases. Your normal login scripts probably set the erase and kill characters you're used to while running in a terminal session.

Try changing /etc/init.d/firstboot to:

stty erase '<erase character>' kill '<kill character>'
printf "Enter IP:"
read IP

where <erase character> is the literal erase character you want to use and <kill character> is the literal kill character you want to use. If you're editing the file using vi , you can enter those characters by using the sequence <ctl-v><erase character> and <ctl-v><kill character> where <ctl-v> is the character you get by pressing and releasing the v key while holding down the control key (usually labeled CNTL , CTL , or CONTROL depending on your keyboard manufacturer.

1 Like

thanks. Sorry for coming late.

I tried with "ssty". It is /dev/console and not /dev/ssty

The command I suggested was stty ; not ssty . And, I didn't say anything about /dev/console nor /dev/ssty (although I would be extremely surprised if your system has a file named /dev/ssty ).

Sorry Don. Its my mistake. Its typo.