HP-UX 11i comfortable shell environment
By default the HP-UX 11i (11.23, 11.31) has an inconvenient shell environment. But it is very easy to make the environment usable.
1. Configure shell history and set an assistant command prompt:
# vi ~/.profile
HISTSIZE=1024
HISTFILE=$HOME/.sh_history
PS1=”[`logname`@`hostname` “‘${PWD}]#’
export HISTSIZE HISTFILE PS1
Now the previous commands can be listed with the history command or directly called on the command line with Esc”-“ and Esc”+”.
2. Set the Erase character to Backspace instead of Esc-H (default):
# vi ~/.profile
OLD: stty erase “^H” kill “^U” intr “^C” eof “^D”
NEW: stty erase “^?” kill “^U” intr “^C” eof “^D”
With that environment HP-UX is almost an easy-to-use Unix system ;-))
8 Comments »
Leave a comment
-
Recent
- Linux – Repair Bootloader / Change Boot device path
- Join RedHat Linux to Microsoft Active Directory
- HP-UX Increase Veritas cluster filesystem (CFS) online
- MC/Serviceguard Cluster – Replace Quorum Server
- HP-UX Integrity Virtual Machines (Integrity VM)
- MC/Serviceguard Cluster on HP-UX 11.31
- HP-UX 11i comfortable shell environment
- Xen Guest (DomU) Installation
- Linux SAN Multipathing (HP Storage)
- Linux Network Bonding
- Linux SAN Multipathing
- ASM Disk not shown in Oracle Universal Installer (OUI) or DBCA
-
Links
-
Archives
- December 2011 (1)
- July 2010 (1)
- April 2010 (1)
- August 2009 (1)
- October 2008 (1)
- August 2008 (1)
- May 2008 (1)
- March 2008 (1)
- February 2008 (1)
- December 2007 (1)
- November 2007 (5)
-
Categories
-
RSS
Entries RSS
Comments RSS
Chapped says : I absolutely agree with this !
Comment by chapped | June 2, 2008 |
Thanks A lot for sharing.Keep continuous
Comment by khalid | November 10, 2008 |
Other way to make it easy-to-use:
1) set yr home shell to ksh
2) set ‘export EDITOR=vi’
That would take care of the history file etc.
Comment by TPC | November 27, 2008 |
Better yet:
1) make shell ksh: chsh self /bin/ksh
2) set login editing to vi after logging in: set -o vi
3) export VISUAL=vi EDITOR=vi
4) export HISTFILE=/tmp/.sh_history.$LOGNAME HISTSIZE=500
5) set pager to more: export PAGER=more
(don’t worry about using more: it’s actually much more usable than the historical UNIX more)
This set of changes helps a lot.
Comment by ddouthitt | January 1, 2009 |
As mentioned in the comments, some one is recommending to change the shell for the root user to /bin/ksh.
– Please note: In the case of server problems, and booting into single-user mode, the /bin symlink of /usr/bin is not mounted as default.
If you want to use ksh shell for root, copy ksh from /usr/bin/ksh into /sbin/ksh and use the /sbin/ksh as your shell in the passwd file.
Comment by Johnny Damtoft | May 11, 2009 |
@Johnny Damtoft: copying anything from /usr/bin just doesn’t solve your problem in case you must boot the system into single user mode: the binaries under /sbin are compiled statically linked libraries: that means, all the required libs are encountered in the resulting binary. If you copy /usr/bin/ksh to /sbin, it won’t start until you mount /usr which contains the required libs.
Comment by ViktorBalogh | October 25, 2011 |
Hi! I was surfing and found your blog post… nice! I love your blog. 🙂 Cheers! Sandra. R.
Comment by sandrar | September 10, 2009 |
Thanks, this was helpful.
Comment by zsombor | November 17, 2011 |