- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Using command line up arrow/down arrow
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 11:23 AM
тАО06-07-2010 11:23 AM
I am new to HPUX but have extensive experience on Tru64.
I would like to configure my terminal access to allow use of the up arrow and down arrow for command recall. I have done this in Tru64 by using ksh and setting the editor to emacs (set -o emacs). I use an old terminal emulator called KEA. It can be configured to emulate vt100 or vt400 (7 bit and 9 bit).
So far, I have been unable to get the arrow keys to work properly without actually mapping them via the KEA maps which causes other issues.
I don't like using vi for the command line editor.
Someone recommended installing and using bash instead of ksh, but I would prefer keeping the system shells native to HPUX.
I am running HPUX 11iV3 (B.11.31).
Is there any simple mechanism to configure this? Should I load bash?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 11:34 AM
тАО06-07-2010 11:34 AM
Re: Using command line up arrow/down arrow
I think you covered your options: use 'bash' or learn 'vi' at least insofar as using it as a command editor.
Whatever you do, do *not* change the default shell for 'root' from '/sbin/sh' [the POSIX shell in HP parlance]. To do so will lead to an un-startable system. You can temporarily change to the 'bash' shell as root. Simply don't make it the default login shell.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 11:50 AM
тАО06-07-2010 11:50 AM
Re: Using command line up arrow/down arrow
I have already changed the root shell to ksh. Would this also be an issue?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 12:07 PM
тАО06-07-2010 12:07 PM
Re: Using command line up arrow/down arrow
> I have already changed the root shell to ksh. Would this also be an issue?
Yes. The default root login shell as defined in '/etc/passwd' *must* remain '/sbin/sh'. This is a statically linked executable that doesn't use shared libraries found in '/usr'. Thus, during startup, before '/usr' is mounted, a fully functional runtime environment exists. Shells other than '/sbin/sh' live in the '/usr' directory and use shared libraries from that mountpoint.
The HP-UX POSIX shell ('/sbin/sh' for root and '/usr/bin/sh' for non-root users) is really as superset of the Korn (ksh88) shell available as '/usr/bin/ksh'. You should have no problems with the POSIX shell if you are accustomed to using 'ksh'.
A Korn93 version of 'ksh' is available as '/usr/dt/bin/dtksh' if you want the enhancements of Korn93. In 11.31, however, you must have loaded the CDE bundle for this to be available.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 12:36 PM
тАО06-07-2010 12:36 PM
Re: Using command line up arrow/down arrow
I've changed it back to /sbin/sh.
Thanks for the heads up.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 01:32 PM
тАО06-07-2010 01:32 PM
Re: Using command line up arrow/down arrow
> Okay, thanks.
If you have found the answers you received, helpful, please read:
http://forums.itrc.hp.com/service/forums/helptips.do?#28
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 04:20 PM
тАО06-07-2010 04:20 PM
Re: Using command line up arrow/down arrow
I'd go with bash. By default, it does command history via arrow keys. You'll just have to invoke the shell by hand after you log in. No biggie.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 04:47 PM
тАО06-07-2010 04:47 PM
Re: Using command line up arrow/down arrow
Arrow keys can work in Ksh.
Add into .kshrc
set -o emacs
alias __A='^P'
alias __D='^B'
alias __B='^N'
alias __C='^F'
Where:
^P type as CTRL-V CTRL-C P
^B type as CTRL-V CTRL-C B
...
Some of my students asked me this questions
in the past.
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 05:14 PM
тАО06-07-2010 05:14 PM
Re: Using command line up arrow/down arrow
> by hand after you log in. [...]
Or exec the thing from the shell start-up
scriptlet (only) if "/usr" is mounted. As
usual, many things are possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2010 01:15 AM
тАО06-08-2010 01:15 AM
Re: Using command line up arrow/down arrow
This may not be good enough. You should make sure that /usr/local/bin/ (if bash is there) is available and all the shlibs and dld are also available.