Thomas Vogt’s IT Blog

knowledge is power …

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 ;-))

May 14, 2008 Posted by | HP, HP-UX, Unix | 8 Comments