Few commands I use often in HP-UX; Coming from over 15 years of Linux experience, the quirks in HP-UX can get annoying at first, but hopefully this will help you through it!
Sick of your backspace key not working? Here’s your answer:
stty erase ^?
Annoyed with the shitty output of df?
Trying to figure out what the model/arch of the server is?
This lists a few different thing… disk related, and/or fibre channel cards:
ioscan -fnNkC disk
ioscan -fnkC disk
ioscan -m lun
ioscan -m dsf
How do I configure which mirror to boot from!?
setboot -v (verify/list)
setboot -a (alt)
setboot -p (primary)
I miss yum/apt-get:
swinstall -s /full/path/to/depotfile.depot \*
swinstall -x autoreboot=true -s /full/path/to/depotfile.depot \*
The \* is pretty cool, it prevents the TUI/GUI from loading, but continues the install/dep check. Makes it feel more like yum or apt-get, instead of aptitude or a GUI update manager.
AHHH usermod and passwd are missing flags in HP-UX! No, just use modprpw instead!
/usr/lbin/modprpw -v (refresh/validate all accounts)
/usr/lbin/modprpw -k -l username (unlock/enable [k] a local account [l])
This will reset the expiration of a locked account.
Where the fuck are the init.d and rc scripts?!
How can I figure out the current runlevel?!
I miss bash, how can I auto-complete a command?!
Like bash, type a few letters of the prefix, but instead of tab, hit:
WTF?! No history command?!?! Lies, hit esc+k – then use j/k to cycle forward/backwards respectively. To edit a line you scroll to, it’s interactive vi in ksh… so ‘l’ to move foward, shift+R to replace, etc…