This guide is copyright © 2000 by UNIXguide.net. I have made some modifications, mostly formatting, for my own purposes from which I have made no profit. I have not redistributed this document. If UNIXguide.net discover I have done this and are unhappy, I will cease and desist upon notification.
Added run-level modes for all operating system types, 27 October 2006.
Directory Mappings | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
---|---|---|---|---|---|---|
Root filesystem | / {/dev/sda1} | / {/dev/vx/dsk/rootvol} | / {/dev/rz0a} | / {/dev/hd4} | / {/dev/vg00/lvol1} | / {/dev/ad0s1a} |
Home directory | /export/home
/dev/vx/dsk/home} | /home {/dev/hd1} | /home {/dev/vg00/lvol4} | |||
/tmp
/dev/vx/dsk/swapvol} | /tmp {/dev/hd3} | /tmp {/dev/vg00/lvol6} | ||||
/usr | /usr {/dev/rz0g} | /usr {/dev/hd2} | /usr {/dev/vg00/lvol7} | /usr {/dev/ad0s1f} | ||
/var | /var {/dev/hd9var} | /var {/dev/vg00/lvol8} | /var {/dev/ad0s1e} | |||
Sample configuration files | - | /usr/newconfig | ||||
User Accounts | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Password files | /etc/passwd
/etc/shadow | /etc/passwd
/etc/shadow | /etc/passwd | /etc/passwd
/etc/security/passwd | /etc/passwd
/tcb/files/auth/r/root | /etc/passwd
/etc/master.passwd |
Groups file | /etc/group | /etc/group | /etc/group | /etc/group
/etc/security/group | /etc/group
/etc/logingroup | /etc/group |
Maximum user ID | 65535 | 2147483647 | 65535 | 4294967295 | 2147483647 | 65535 |
Allow/deny remote login | /etc/securetty {ttyp1} | /etc/default/login {CONSOLE=/dev/console} | /etc/securettys {ttyp1} | /etc/security/user {rlogin=true} | /etc/securetty {console} | /etc/ttys {secure} |
User nobody's id | 99 | 60001 & 65534(nobody4) | 65534 | 4294967294 | -2 | 65534 |
Group nobody's id | 99 | 60002 & 65534(nogroup) | 65534 | 4294967294 | -2(nogroup) | 65534 |
Recover root password | {lilo} control-x linux S passwd root {grub} c kernel vmlinuz-2.4.9-13 single ro root=/dev/hda8 initrd /initrd-2.4.9-13.img boot passwd root | boot cdrom -s
mkdir /tmp/a mount /dev/c0t0d0s0 /tmp/a vi /tmp/a/etc/shadow | press the HALT Button or (Control-P)
>>>boot -fl s lsmbstartup /sbin/bcheckrc passwd root | boot from CD/Tape
Installation/Maintenance Start Limited Shell getrootfs hdisk0 vi /etc/security/passwd | >boot Interact with IPL ? Y ISL>hpux -iS passwd root | ok boot -s
passwd root |
Create new user | useradd | useradd | useradd | mkuser | useradd | adduser |
Delete user | userdel | userdel | userdel | rmuser | userdel | rmuser |
List users | logins | lsuser -f ALL | logins | |||
Modify user account | usermod | usermod | usermod | chuser -a | usermod | |
General Commands | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Unique host ID | hostid | hostid | hostid | hostid | uname -i | |
Administrator | linuxconf | admintool | sysman | smit | sam | |
Performance monitor | top | top | top | top monitor | top glance | top |
System activity reporter | sar {sysstat} | sar | /usr/opt/svr4/bin/sar | sar | sar | sa |
Virtual memory statistics | vmstat | vmstat | vmstat | vmstat | vmstat | vmstat |
I/O statistics | iostat {sysstat} | iostat | iostat | iostat | iostat | iostat |
Error logs | dmesg | dmesg | uerf -R -o full | alog -o -t boot errpt | dmesg | dmesg |
Physical RAM | 64 GB {>2.3.24} | 16TB | 4TB | 1TB | 4TB | |
Shared memory | sysctl kernel.shmmax | 2.75GB | 8TB | |||
Process data space | 900 MB | 2GB | 4GB | |||
Swap device | /dev/sda2 | /dev/vx/dsk/swapvol | /dev/rz0b | /dev/hd6 | /dev/vg00/lvol2 | /dev/ad0s1b |
Swap file type | partition type 82 | swap | raw | /etc/swapspaces | swap | swap |
Display swap size | free | swap -l | swapon -s | lsps -a | swapinfo -a | swapinfo |
Activate swap | swapon -a | swap -a | swapon -a | swapon -a | swapon -a | swapon -a |
Printers | Linux | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Printer queues | /var/spool/lpd/lp/* | /etc/lp/interfaces/* | /usr/spool/lpd | /etc/qconfig | /etc/lp/interface/* | /var/spool/print |
Stop LP | /etc/init.d/lpd stop | /usr/lib/lp/lpshut | /sbin/init.d/lpd stop | stopsrc -s lpd | lpshut | |
Start LP | /etc/init.d/lpd start | /usr/lib/lp/lpsched | /sbin/init.d/lpd start | startsrc -s lpd | lpsched | lpd |
Submit print jobs | lpr | lp lpr | lp lpr | enq lp lpr qprt | lp | lp |
LP statistics | lpq | lpstat | lpstat | enq -A lpq lpstat qchk | lpstat | lpq |
Remove print jobs | lprm | cancel lprm | cancel lprm | cancel lprm qcan enq -x | cancel | cancel
lprm |
Add printer queue | printtool | lpadmin -p pq | lprsetup | smit mkpq | lpadmin -p pq | |
Remove printer queue | lpadmin -x pq | lprsetup | smit rmpq | lpadmin -x pq | ||
Make default printer | lpadmin -d pq | export PRINTER="lp" | export LPDEST="pq" | lpadmin -d pq | ||
TCP/IP | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Network IP configuration | /etc/sysconfig/network-scripts/ | /etc/hostname.* /etc/inet/* /etc/defaultrouter | /etc/rc.config | lsattr -E -l inet0 | /etc/rc.config.d/netconf | /etc/rc.conf |
Hosts IP addresses | /etc/hosts | /etc/inet/hosts | /etc/hosts | /etc/hosts | /etc/hosts | /etc/hosts |
Name service switch | /etc/nsswitch.conf | /etc/nsswitch.conf | /etc/svc.conf | /etc/netsvc.conf | /etc/nsswitch.conf | /etc/host.conf |
Network parameters | sysctl -a | grep net | ndd /dev/[tcp|ip] ? | no -a | ndd -h | sysctl | |
Routing daemon | routed | in.routed | routed | gated | gated | routed |
NIC configurations | ifconfig -a | ifconfig -a | ifconfig -a | ifconfig -a | lanscan -v | ifconfig -a |
Secondary IP address | modprobe ip_alias ifconfig eth0:1 IP | ifconfig hme0:1 IP up | ifconfig ln0 alias | ifconfig en0 alias IP | ifconfig lan0:1 IP | ifconfig xl0 alias IP |
Login prompt | /etc/issue | BANNER @ /etc/default/telnetd | /etc/issue | HERALD @
/etc/security/login.cfg | telnetd -b /etc/issue | |
Increase the number of pseudo-terminals | cd /dev ./MAKEDEV -v pty | {/etc/system}
set pt_cnt = # {SYSV} set npty = # {BSD} {/etc/iu.ap} ptsl 0 # ldterm ttcompat halt boot -r | cd /dev ./MAKEDEV PTY_1 | odmget -q "attribute=num and uniquetype=pty/pty/pty" PdAt | sed
"s/0-64/0-512/" |
odmchange -q "attribute=num and uniquetype=pty/pty/pty" -o PdAt chdev -l pty0 -anum=256 -P reboot | rebuild your kernel with these new values NPTY=#
NSTRPY=# reboot insf -d ptys -n # insf -d ptym -n # insf -d pts -s # -e -v | |
Maximum number of ptys | 256 | 176
{BSD}
3000 {SYSV} | 8192 | 512 | {MAXUSERS} | |
Remote shell | rsh | rsh | rsh | remsh rsh | remsh | rsh |
YP/NIS service binder | /sbin/ypbind | /usr/lib/netsvc/yp/ypbind | /usr/sbin/ypbind | /usr/lib/netsvc/yp/ypbind | /usr/lib/netsvc/yp/ypbind | /usr/sbin/ypbind |
System Files | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
NFS exported | /etc/exports | /etc/dfs/dfstab
/etc/dfs/sharetab | /etc/exports | /etc/exports | /etc/exports | /etc/exports |
NFS client-mounted directories | /var/lib/nfs/xtab | /etc/rmtab | /var/adm/mountdtab | /etc/xtab | /etc/xtab | |
Maximum file system | 2 TB | 1 TB 8000 TB {vxfs} | 128 GB {<= 3.2G}
512 GB {>= 4.0} 16 TB {advfs} | 128 GB | 128 GB | |
Maximum file size | 2 GB {512B block size}
8192 GB {8KB block size} | 1 TB 2 GB {=<2.5.1} | 128 GB {<= 3.2G} 512 GB {>= 4.0} 16 TB {advfs} | 64 GB | 128 GB | |
Maximum number file descriptors | sysctl fs.file-max | 64 K | 64 K | 64 K | 60~ K | |
Disk/LVM Commands | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX:Disk &Filesystem | FreeBSD |
Filesystem table | /etc/fstab | /etc/vfstab | /etc/fstab | /etc/filesystems | /etc/fstab | /etc/fstab |
Free disk blocks | df -k | df -k | df -k | df -k | bdf | df -k |
Device listing | cat /proc/devices | sysdef | lsdev -C | /sbin/ioscan | ||
Disk information | cat /proc/scsi/scsi0/sda/model | format -d c#t#d# format>current format>inquiry | file /dev/rrz0c | bootinfo -s hdisk# | diskinfo /dev/rdsk/c#t#d# | fdisk -v ad0 |
Disk label | fdisk -l | prtvtoc | disklabel -p rz0 | lspv -l hdisk# | pvdisplay -v /dev/dsk/C#t#d# | disklabel ad0 |
LVM concepts | logical extents | sub disk | sub disk | Partition | logical extents | sub disk |
logical volume | volume | volume | volume | logical volume | volume | |
Plex | Plex | Plex | ||||
volume group | disk group | disk group | volume group | volume group | ||
Journal filesystem type | ext3 reiserfs | vxfs | advfs | jfs | vxfs | |
Default volume group | /dev/vx/dsk/rootdg | /dev/vol/rootdg | /dev/rootvg | /dev/vg00 | ||
Display volume group | vgdisplay -v | vxprint -l -g rootdg | volprint -l -g rootdg | lsvg -l rootvg | vgdisplay -v vg00 | |
Modify physical volume | pvchange | chpv | pvchange | |||
Prepare physical disk | pvcreate | vxdiskadd | voldiskadd | mkdev -c disk -l hdisknum | pvcreate | |
List physical volume | pvdisplay | vxprint -dl | volprint -dl | lspv | pvdisplay | vinum ld |
Remove disk from volume group | vgreduce | vxdg rmdisk | voldg rmdisk | reducevg | vgreduce | |
Move logical volumes to other physical volumes | pvmove | vxassist move | volassist move | migratepv | pvmove | vinum move -f drive object |
Create volume group | vgcreate | vxdg init | voldg init | mkvg | vgcreate | |
Remove volume group | vgremove | vgremove | ||||
Volume group availability | vgchange | chvg varyonvg varyoffvg | vgchange | |||
Restore volume group | vgcfgrestore | vgcfgrestore | ||||
Exports volume group | vgexport | vxdg deport | voldg deport | exportvg | vgexport | |
Imports volume group | vgimport | vxdg import | voldg import | importvg | vgimport | |
Volume group listing | vgscan | lsvg | vgscan | |||
Change logical volume characteristics | lvchange | vxedit set | voledit set | chlv | lvchange | |
List logical volume | lvdisplay | vxprint -vl | volprint -vl | lslv | lvdisplay | vinum lv |
Make logical volume | lvcreate | vxassist make | volassist make | mklv | lvcreate | |
Extend logical volume | lvextend | vxassist growto | volassist growto | extendlv | lvextend | |
Reduce logical volume | lvreduce | vxassist shrinkto | volassist shrinkto | AIX reduce LV | lvreduce | |
Remove logical volume | lvremove | vxedit rm | voledit -g rootdg -rf rm vol1 | rmlv | lvremove | vinum rm vol |
Prepare boot volumes | lilo | vxbootsetup | bootlist -m normal | lvlnboot | ||
Remove boot volumes | lvrmboot | |||||
Extend file system | resize2fs resize_reiserfs | vxva mkfs -M | chfs -a size=# /mt | extendfs /dev/vg00/lvol8
fsadm -F vxfs -b {LE * 1024} /mt | ||
Reduce/split mirrors | lvsplit | rmlvcopy | lvsplit | |||
Merge mirrors | lvmerge | lvmerge | ||||
Create mirrors | vxassist mirror | volassist make vol 100mb mirror=true | mklv -c 2 | lvcreate -m 1 | vinum mirror drive | |
Add mirrors | mklvcopy lv 2 | lvextend -m 1 | ||||
Create striped volumes | lvcreate -i 3 -I 64 | vxassist make vol 100mb layout=raid5 | volassist make vol 100mb layout=stripe | mklv -u 3 -S 64K | lvcreate -i 3 -I 64 | vinum stripe drive |
System recovery tape | /usr/sys/bin/btcreate | mksysb -i /dev/rmt0 | /opt/ignite/bin/make_recovery | |||
Backup | tar cvf /dev/rst0 / | ufsdump | vdump | savevg -i rootvg | fbackup | vinum saveconfig |
Restore | tar xvf /dev/rst0 | ufsrestore | vrestore | restvg | frecover | |
Miscellaneous | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Startup script | /etc/rc.d/rc | /etc/init.d | /sbin/init.d | /etc/rc | /sbin/rc | /etc/rc |
Kernel | /boot/vmlinuz | /kernel/genunix | /vmunix | /usr/lib/boot/unix_up | /stand/vmunix | /kernel |
Kernel parameters | sysctl -a | sysdef -i | sysconfig dxkerneltuner | lsattr -E -l sys0 | sysdef kmtun kmsystem | sysctl -a |
Reconfigure the kernel | cd /usr/src/linux
make mrproper make menuconfig make dep make clean make bzImage make install make modules make modules_install cp arch/i386/boot/bzImage /boot/vmlinuz-2.2.16 mkinitrd /boot/initrd-2.2.16.img 2.2.16 vi /etc/lilo.conf lilo | vi /etc/system
reboot | doconfig | chdev -l sys0 -a | cd /stand/build
/usr/lbin/sysadm/system_prep -v -s system vi system mk_kernel -s system cd /stand mv system system.prev mv vmunix vmunix.prev mv dlkm dlkm.prev mv /stand/build/system system kmupdate /stand/build/vmunix_test | cd /sys/i386/conf
vi KERNEL config KERNEL cd ../../compile/KERNEL make depend make make install |
List modules | lsmod | modinfo | genkex | kmadmin -s | kldstat | |
Load module | insmod | modload | kmadmin -L | kldload | ||
Unload module | rmmod | modunload | kmadmin -U | kldunload | ||
Initialize system | netconf | sys-unconfig | netsetup | install_assist | set_parms initial | /stand/sysinstall |
Physical RAM | free | prtconf | uerf | grep memory | bootinfo -r | grep -i Physical /var/adm/syslog/syslog.log | sysctl hw.physmem |
Kernel bits | getconf LONG_BIT | isainfo -kv | 64 | bootinfo -K | getconf KERNEL_BITS | |
Crash utility | lcrash | crash | kdbx | crash | adb | crash |
Trace system calls | strace | truss | trace | syscalls | tusc | truss |
Miscellaneous | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Machine model | uname -m | uname -imp | uname -p | uname -m bootinfo -m | model uname -m | uname -m |
OS Level | uname -r | uname -r | sizer -v | oslevel | uname -r | uname -r |
Run Level | runlevel | who -r | who -r | who -r | who -r | |
rc0 - system halted. rc1 - single-user mode. rc2-4 - multiuser modes, level 2 or 3 depends on distro. rc5 - multiuser with GUI, most (but not all) distros. rc6 - reboot system, return to default run level. |
S, s - single user mode, /etc/inittab not required, basic filesystems
mounted. rc0 - firmware (sparc). rc1 - administrator mode, local filesystems mounted, essential system processes, also single user mode. rc2 - multiuser mode, multiuser environment processes and daemons. rc3 - multiuser extended mode, local resources available over network. rc4 - alternative multiuser configuration, not necessary for operation, usually unused. rc5 - power-down. rc6 - reboot. a, b, c - /etc/inittab pseudo-state entries with the a, b, or c run level set. Q, q - re-examine /etc/inittab. |
rc0 - system completely shut down, processes terminated and
filesystems unmounted. rc1 - single-user mode, services and daemons terminated and filesystems unmounted. rc2 - multiuser mode, without NFS. i rc3 - multiuser mode, normal operation. rc4 - unused. rc5 - unused. rc6 - reboot. |
rc0 - reserved. rc1 - reserved. rc2 - (default) multiuser mode. rc3-rc9 - administrator-defined. |
rc0 - shut down, processes terminated, filesystems unmounted. rc1,s,S - single-user mode, services and daemons terminated, filesystems unmounted. rc2 - multiuser mode, without NFS. rc3 - multiuser mode, normal operational. rc4 - multiuser mode, with VUE (GUI). rc6 - reboot. |
rc-1 - permanently insecure mode—always run system at level 0. rc0 - insecure mode—immutable and append-only flags changeable, devices may be read or written subject to their permissions. rc1 - secure mode, system immutable and append-only flags may not be turned off; mounted filesystems, /dev/mem, and /dev/kmem read-only. rc2 - highly secure mode, same as secure mode, plus disks read-only whether mounted or not, settimeofday() can only advance the time. | |
Core dump files | /var/crash/`uname -n` | /var/adm/ras | /var/adm/crash | |||
Miscellaneous | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Boot single user | {lilo} control-x linux S {grub} c kernel vmlinuz-2.4.9-13 single ro root=/dev/hda8 initrd /initrd-2.4.9-13.img boot | ok boot -s | >>> boot -fl s | Key on service mode/F4
Boot from CD/Tape Select Maintenance Limited function Shell | >boot Interact with IPL ? Y ISL>hpux -iS | ok boot -s |
Maintenance mode | ok boot -as | >boot Interact with IPL ? Y ISL>hpux -lm | ok boot -as | |||
Interrupt key | Stop-A | control-P | control-B | |||
Return to console | ok go | co | ||||
Timezone management | /etc/sysconfig/clock | /etc/TIMEZONE /etc/default/init | /etc/svid3_tz timezone | /etc/environment /etc/profile | /etc/TIMEZONE | /etc/localtime |
NTP dæmon | /etc/ntp.conf /etc/rc.d/init.d/xntpd | /etc/inet/ntp.conf /etc/init.d/xntpd | rcmgr set XNTPD_CONF YES /sbin/init.d/xntpd | /etc/ntp.conf startsrc -s xntpd | /etc/rc.config.d/netdaemons /sbin/init.d/xntpd | /etc/rc.conf {xntpd_enable="YES"} /etc/rc.network |
Software | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Install software | rpm -i package | pkgadd | setld -l | installp -a | swinstall | pkg_add |
Uninstall software | rpm -e package | pkgrm | setld -d | installp -u | swremove | pkg_delete |
List installed software | rpm -qa | pkginfo | setld -i | lslpp -L all | swlist | pkg_info -a |
Verify installed software | rpm -V package | pkginfo -i
pkginfo -p | setld -v | lppchk -v | swlist -l fileset -a state | |
List all files | rpm -ql package | pkgchk -l package | setld -i package | lslpp -f fileset | swlist -l file fileset | pkg_info -L package |
List installed patches | patchadd -p | dupatch -track -type patch | instfix -i | swlist -l patch what /stand/vmunix | ||
Package owner | rpm -qf file | pkgchk -l -p path | lslpp -w path | swlist -l file | grep path | ||
SW directory | /var/lib/rpm | /var/sadm | /var/adm/smlogs | /usr/lpp | /var/adm/sw/ | /var/db/pkg |
Devices | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
Devices | /dev | /devices | /dev | /dev | /dev | /dev |
Install devices for attached peripherals | /dev/MAKEDEV | drvconfig
devlinks disks tapes ports | scu scan edt scsimgr -scan_all | cfgmgr -v | insf -e | /dev/MAKEDEV |
Remove device | rem_drv | rmdev -l | rmsf | |||
Device drivers | prtconf -D | lscfg | lsdev | |||
CPU | cat /proc/cpuinfo | psrinfo -v | psrinfo -v | lsdev -Cc processor | ioscan -fnC processor | sysctl hw.model |
List terminal | pmadm -l | lsdev -Cc tty | ioscan -fnC tty | |||
Diagnostics | lspci pnpdump | /usr/platform/`uname -m`/
sbin/prtdiag ok test-all /opt/SUNWvts/bin/sunvts | diag | stm | pciconf -l | |
Whole disk | /dev/sda | /dev/c#t#d0s2 | /dev/rz0c | /dev/hdisk# | /dev/dsk/c#t#d0 | /dev/ad0s1c |
CDROM | /dev/cdrom | /dev/dsk/c#t6d0s2 | /dev/rz3c | /dev/cd0 | /dev/dsk/c#t2d0 | /dev/acd0c |
CDROM file type | iso9660 | hsfs | cdfs | cdrfs | cdfs | cd9660 |
Rewinding tape drive | /dev/rst0 { c 9 0} | /dev/rmt/0 | /dev/rmt0 | /dev/rmt0 | /dev/rmt/0m | /dev/rwt0d |
Non-rewinding tape drive | /dev/nrst0 { c 9 128 } | /dev/rmt/0n | /dev/nrmt0 | /dev/rmt0.1 | /dev/rmt/0mn | /dev/nrwt0d |
Floppy drive | /dev/fd0 | /dev/diskette | /dev/fd0c | /dev/rfd0 | - | /dev/fd0 |
Links | Linux (RedHat) | Solaris | Tru64 | AIX | HP-UX | FreeBSD |
FAQ | Linux FAQ | Solaris 2 FAQ | Tru64 FAQ | AIX-FAQ/tt> | HP-UX FAQ | FreeBSD FAQ |
Online manual | Linux documentation Project | Solaris 10 documentation | Tru64 documents | AIX 5.3 documentation | HP-UX reference manual | FreeBSD hand book |
Technical support | Red Hat support | SunSolve | Alpha Systems Support | p5 TechSupport | IT Resource Center | |
Free software | Linux software map | Sun freeware | Tru64 demos, shareware and freeware | Public-domain software library | HP-UX ports | FreeBSD primary site |
Fun links | AIX command primer |
Developer downloads
Compiler (gcc) HP’s gdb (wdb) Newer version of Perl |