HP-UX Cheatsheet
#
HP-UX is Hewlett Packard Enterprise’s proprietary Unix operating system, known for its reliability and performance, particularly on HP’s PA-RISC and Itanium-based systems. Below is a comprehensive cheatsheet to help you get started with HP-UX, covering various commands and their descriptions.
Command | Description |
---|
uname -a | Display all system information |
model | Display hardware model information |
dmesg | Show system boot messages |
top | Display real-time system statistics |
ps -ef | List all running processes |
swlist | List installed software packages |
swinstall -s <source> <package> | Install a software package |
swremove <package> | Remove a software package |
sam | System Administration Manager interface |
User and Group Management
#
Command | Description |
---|
useradd <username> | Add a new user |
userdel <username> | Delete a user |
usermod -G <group> <username> | Add a user to a group |
groupadd <group> | Create a new group |
groupdel <group> | Delete a group |
passwd <username> | Change a user’s password |
Network Management
#
Command | Description |
---|
ifconfig -a | Display all network interfaces |
ping <hostname/IP> | Send ICMP ECHO_REQUEST to network hosts |
netstat -rn | Display the routing table |
route add <destination> <gateway> | Add a static route |
lanscan | List all LAN interfaces |
set_parms | Configure network parameters |
Disk Management
#
Command | Description |
---|
bdf | Display disk usage in a human-readable format |
du -sk <directory> | Show disk usage of a directory |
vgdisplay | Display volume group information |
lvdisplay | Display logical volume information |
mount | Display all mounted filesystems |
mount <device> <directory> | Mount a filesystem |
umount <directory> | Unmount a filesystem |
newfs /dev/<device> | Create a new filesystem on a device |
System Services and Daemons
#
Command | Description |
---|
sh /sbin/init.d/<service> start | Start a service |
sh /sbin/init.d/<service> stop | Stop a service |
sh /sbin/init.d/<service> restart | Restart a service |
chkconfig --list | List all services |
chkconfig <service> on | Enable a service to start at boot |
chkconfig <service> off | Disable a service from starting at boot |
File Operations
#
Command | Description |
---|
cp <source> <destination> | Copy files or directories |
mv <source> <destination> | Move or rename files or directories |
rm <file> | Delete a file |
rm -r <directory> | Delete a directory and its contents |
chmod <permissions> <file> | Change file permissions |
chown <owner>:<group> <file> | Change file owner and group |
ln -s <target> <link> | Create a symbolic link |