cancel
Showing results for 
Search instead for 
Did you mean: 

Terminal console

 
SOLVED
Go to solution
balaji_vvv
Frequent Advisor

Terminal console

I'm going on to my server single user mode where i need to edit the inittab file to disable one entry with '#' character. But in my terminal console, im unable to type '#' character, can anyone let me know how can i type '#' character?? My term setting is hp and i dont have any issue editing the file.?
5 REPLIES
Steven Schweda
Honored Contributor

Re: Terminal console

stty -a

Has "#" been assigned some special meaning?
Dennis Handly
Acclaimed Contributor
Solution

Re: Terminal console

As Steven says, sometimes @ and # are treated as kill and erase by default.
You can use stty(1) to fix them or you can use "\#" to type a #.
balaji_vvv
Frequent Advisor

Re: Terminal console

Thanks Dennis. It worked perfectly. I have just used \#. I assinged credits for both of you.
Bill Hassell
Honored Contributor

Re: Terminal console

The default setting for all terminal connections is #=backspace, @=cancel. When you login using the standard /etc/profile and $HOME/.profile there are stty commands that set the values to more reasonable settings. Apparently in single user mode your profiles are not being run. Type the command: exit. This will restart the shell in single user mode and should run the profiles. Otherwise, you can just set the correct values by typing these commands in single user mode:

mount /usr
mount /var
mount /tmp
eval $(ttytype -s)

The 3 mountpoints are requried to run vi, and the ttytype command will automatically identify your terminal and set the erase and cancel characters.


Bill Hassell, sysadmin
balaji_vvv
Frequent Advisor

Re: Terminal console

Issue resolved