UNIXguide.
net ( AIX, FreeBSD, HP-UX, LINUX, SOLARIS & Tru64)
Page 1 of 6
2000 UNIXguide.net, All Rights Reserved. Hermelito Go Directory Mappings Root filesystem Home Directory / /home /tmp /usr /var Sample configuration files User Accounts Password files Groups file Maximum # of user ID Allow/Deny remote login AIX /etc/passwd /etc/security/passwd /etc/group /etc/security/group 4294967295 /etc/security/user {rlogin=true} FreeBSD AIX {/dev/hd4} {/dev/hd1} {/dev/hd3} {/dev/hd2} {/dev/hd9var} FreeBSD HP-UX / /home /tmp {/dev/vg00/lvol1} {/dev/vg00/lvol4} {/dev/vg00/lvol6} {/dev/vg00/lvol7} {/dev/vg00/lvol8}
(Last Update:
Wednesday, 07-Dec-2005 11:11:32 PST ) LINUX(RedHat) SOLARIS / {/dev/vx/dsk/rootvol} / Tru64 {/dev/rz0a}
{/dev/ad0s1a}
{/dev/sda1}
/export/home /dev/vx/dsk/home} /tmp /dev/vx/dsk/swapvol} /usr /var /usr {/dev/rz0g}
/usr /var
{/dev/ad0s1f} {/dev/ad0s1e}
/usr /var
/usr/newconfig HP-UX /etc/passwd /tcb/files/auth/r/root /etc/group /etc/logingroup 2147483647 /etc/securetty {console} -2 -2(nogroup) LINUX(RedHat) /etc/passwd /etc/shadow /etc/group 65535 /etc/securetty {ttyp1} 99 99 {lilo} control-x linux S passwd root ok boot -s passwd root >boot Interact with IPL ? Y ISL>hpux -iS 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 useradd userdel Solaris /etc/passwd /etc/shadow /etc/group 2147483647 /etc/default/login {CONSOLE=/dev/console} 60001 & 65534(nobody4) 60002 & 65534(nogroup) Tru64 /etc/passwd /etc/group 65535 /etc/securettys {ttyp1} 65534 65534
/etc/passwd
/etc/master.passwd /etc/group 65535
/etc/ttys
{secure} 65534 65534
User nobody's id 4294967294 # Group nobody's id # 4294967294
Recover root password
boot from CD/Tape Installation/Maintenance Start Limited Shell getrootfs hdisk0 vi /etc/security/passwd
press the HALT Button or boot cdrom -s (Control-P) mkdir /tmp/a >>>boot -fl s mount /dev/c0t0d0s0 /tmp/a lsmbstartup /sbin/bcheckrc vi /tmp/a/etc/shadow passwd root
Create new user Delete user List users Modify user account General Commands Unique host ID Administrator Performance monitor System activity reporter Virtual Memory statistics I/O statistics Error logs
mkuser rmuser lsuser -f ALL chuser -a AIX hostid smit top monitor sar vmstat iostat alog -o -t boot
adduser rmuser
useradd userdel logins usermod FreeBSD uname -i sam HP-UX
useradd userdel logins
useradd userdel
usermod LINUX(RedHat) hostid linuxconf top sar {sysstat} vmstat iostat {sysstat} dmesg
usermod Solaris hostid admintool top sar vmstat iostat dmesg
usermod Tru64 hostid sysman top /usr/opt/svr4/bin/sar vmstat iostat uerf -R -o full
top sa vmstat iostat dmesg
top glance sar vmstat iostat dmesg
http://www.unixguide.net/unixguide.shtml
10/6/2011
UNIXguide.net ( AIX, FreeBSD, HP-UX, LINUX, SOLARIS & Tru64)
Page 2 of 6
errpt Physical RAM Shared Memory Process Data Space Swap device Swap file type Display swap size Activate Swap Printers Printer Queues Stop LP Start LP Submit print jobs 1TB 2.75GB 2GB /dev/hd6 /etc/swapspaces lsps -a swapon -a AIX /etc/qconfig stopsrc -s lpd startsrc -s lpd enq lp lpr qprt enq -A lpq lpstat qchk cancel lprm qcan enq -x smit mkpq smit rmpq export LPDEST="pq" AIX lsattr -E -l inet0 /etc/rc.conf lpd 4TB 8TB 4GB 64 GB {>2.3.24} sysctl kernel.shmmax 900 MB /dev/sda2 partition type 82 free swapon -a HP-UX /etc/lp/interface/* lpshut lpsched LINUX /var/spool/lpd/lp/* /etc/init.d/lpd stop /etc/init.d/lpd start /dev/vx/dsk/swapvol swap swap -l swap -a Solaris /etc/lp/interfaces/* /usr/lib/lp/lpshut /usr/lib/lp/lpsched lp lpr /dev/rz0b raw swapon -s swapon -a Tru64 /usr/spool/lpd /sbin/init.d/lpd stop /sbin/init.d/lpd start lp lpr 16TB 4TB
/dev/ad0s1b
swap swapinfo swapon -a FreeBSD /var/spool/print
/dev/vg00/lvol2 swap swapinfo -a swapon -a
lp
lp
lpr
LP statistics
lpq
lpstat
lpq
lpstat
lpstat
Remove print jobs Add printer queue Remove Printer queue Make default printer TCP/IP Network IP configuration Hosts IP addresses Name service switch Network parameters Routing daemon NIC Configurations Secondary IP Address Login prompt
cancel lprm
cancel
lprm
cancel lprm
cancel lprm
lpadmin -p pq lpadmin -x pq lpadmin -d pq HP-UX /etc/rc.config.d/netconf
printtool
lpadmin -p pq lpadmin -x pq lpadmin -d pq LINUX(RedHat) Solaris /etc/hostname.* /etc/inet/* /etc/defaultrouter /etc/inet/hosts /etc/nsswitch.conf ndd /dev/[tcp|ip] ? in.routed ifconfig -a ifconfig hme0:1 IP up BANNER @ /etc/default/telnetd
lprsetup lprsetup export PRINTER="lp" Tru64 /etc/rc.config
/etc/sysconfig/networkscripts/ /etc/hosts /etc/nsswitch.conf sysctl -a | grep net routed ifconfig -a modprobe ip_alias ifconfig eth0:1 IP /etc/issue
/etc/hosts /etc/netsvc.conf no -a gated ifconfig -a ifconfig en0 alias IP HERALD @ /etc/security/login.cfg 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
/etc/hosts /etc/host.conf sysctl routed ifconfig -a ifconfig xl0 alias IP
/etc/hosts /etc/nsswitch.conf ndd -h gated lanscan -v ifconfig lan0:1 IP telnetd -b /etc/issue
/etc/hosts /etc/svc.conf
routed ifconfig -a ifconfig ln0 alias /etc/issue
Increase the # of pseudoterminals
rebuild your kernel with these new values NPTY=# NSTRPY=# reboot insf -d ptys -n #
cd /dev ./MAKEDEV -v pty
{/etc/system} set pt_cnt = # set npty = #
{SYSV} {BSD}
cd /dev ./MAKEDEV PTY_1
{/etc/iu.ap} ptsl 0 # ldterm ttcompat
http://www.unixguide.net/unixguide.shtml
10/6/2011
UNIXguide.net ( AIX, FreeBSD, HP-UX, LINUX, SOLARIS & Tru64)
Page 3 of 6
chdev -l pty0 -anum=256 -P reboot Maximum # of ptys Remote Shell YP/NIS service binder System Files NFS exported NFS Client mounted directories Max File System 512 remsh rsh /usr/lib/netsvc/yp/ypbind AIX /etc/exports rsh /usr/sbin/ypbind FreeBSD /etc/exports
insf -d ptym -n # insf -d pts -s # -e -v
halt boot -r
{MAXUSERS} remsh /usr/lib/netsvc/yp/ypbind HP-UX /etc/exports
256 rsh /sbin/ypbind LINUX(RedHat) /etc/exports
176 3000 rsh
{BSD} {SYSV}
8192 rsh /usr/sbin/ypbind Tru64 /etc/exports
/usr/lib/netsvc/yp/ypbind Solaris /etc/dfs/dfstab /etc/dfs/sharetab /etc/rmtab
/etc/xtab
/etc/xtab
/var/lib/nfs/xtab
/var/adm/mountdtab 128 GB {<= 3.2G} 512 GB {>= 4.0} 16 TB {advfs} 128 GB {<= 3.2G} 512 GB {>= 4.0} 16 TB {advfs} 64 K
128 GB
128 GB
2 TB
1 TB 8000 TB {vxfs} {512B block size} {8KB block size} 1 TB 2 GB {=<2.5.1} 64 K SOLARIS /etc/vfstab df -k sysdef format -d c#t#d# format>current format>inquiry prtvtoc sub disk Volume Plex disk group vxfs /dev/vx/dsk/rootdg
Max File Size Max # File Descriptors DISK/LVM Commands
64 GB
128 GB
2 GB 8192 GB
64 K AIX FreeBSD /etc/fstab df -k
60~ K HP-UX:Disk &Filesystem /etc/fstab bdf /sbin/ioscan fdisk -v ad0 disklabel ad0 sub disk Volume Plex diskinfo /dev/rdsk/c#t#d# pvdisplay -v /dev/dsk/C#t#d# logical extents logical volume volume group vxfs /dev/vg00 vgdisplay -v vg00 pvchange pvcreate vinum ld pvdisplay vgreduce vinum move -f drive object
sysctl fs.file-max LINUX(RedHat) /etc/fstab df -k cat /proc/devices cat /proc/scsi/scsi0/sda/model fdisk -l logical extents logical volume volume group ext3 reiserfs
Tru64 /etc/fstab df -k
Filesystem table /etc/filesystems Free disk blocks df -k Device listing lsdev -C
Disk information bootinfo -s hdisk# Disk Label LVM Concepts lspv -l hdisk# Partition Volume Volume group Journal Filesystem type Default volume group Display volume group Modify physical volume jfs /dev/rootvg lsvg -l rootvg chpv
file /dev/rrz0c disklabel -p rz0 sub disk Volume Plex disk group advfs /dev/vol/rootdg volprint -l -g rootdg
vgdisplay -v pvchange pvcreate pvdisplay vgreduce
vxprint -l -g rootdg
Prepare physical mkdev -c disk -l hdisk# disk List physical volume lspv
vxdiskadd vxprint -dl vxdg rmdisk
voldiskadd volprint -dl voldg rmdisk
Remove disk from reducevg volume group Move logical volumes to migratepv another physical volumes Create volume group Remove volume group mkvg
pvmove
pvmove
vxassist move
volassist move
vgcreate vgremove
vgcreate vgremove
vxdg init
voldg init
http://www.unixguide.net/unixguide.shtml
10/6/2011
UNIXguide.net ( AIX, FreeBSD, HP-UX, LINUX, SOLARIS & Tru64)
Page 4 of 6
Volume group availability Restore volume group Exports volume group Imports volume group Volume group listing Change logical volume characteristics List logical volume Make logical volume Extend logical volume Reduce logical volume Remove logical volume Prepare boot volumes Remove boot volumes Extend File system Reduce/Split mirrors Merge mirrors Create mirrors Add mirrors Create striped volumes System recovery tape Backup Restore MISC Startup script Kernel Kernel Parameters
chvg varyonvg varyoffvg
vgchange
vgchange
vgcfgrestore exportvg importvg lsvg chlv lslv mklv extendlv AIX reduce LV rmlv bootlist -m normal vinum rm vol vinum lv vgexport vgimport vgscan lvchange lvdisplay lvcreate lvextend lvreduce lvremove lvlnboot lvrmboot chfs -a size=# /mt rmlvcopy extendfs /dev/vg00/lvol8 fsadm -F vxfs -b {LE * 1024} /mt lvsplit lvmerge mklv -c 2 mklvcopy lv 2 mklv -u 3 -S 64K mksysb -i /dev/rmt0 savevg -i rootvg restvg AIX /etc/rc /usr/lib/boot/unix_up lsattr -E -l sys0 FreeBSD vinum saveconfig vinum stripe drive vinum mirror drive lvcreate -m 1 lvextend -m 1 lvcreate -i 3 -I 64 /opt/ignite/bin/make_recovery fbackup frecover HP-UX /sbin/rc /stand/vmunix sysdef kmtune kmsystem
vgcfgrestore vgexport vgimport vgscan lvchange lvdisplay lvcreate lvextend lvreduce lvremove lilo vxedit set vxprint -vl vxassist make vxassist growto vxassist shrinkto vxedit rm vxbootsetup voledit set volprint -vl volassist make volassist growto volassist shrinkto voledit -g rootdg -rf rm vol1 vxdg deport vxdg import voldg deport voldg import
resize2fs resize_reiserfs lvsplit lvmerge
vxva mkfs -M
vxassist mirror
volassist make vol 100mb mirror=true
lvcreate -i 3 -I 64
vxassist make vol 100mb layout=raid5
volassist make vol 100mb layout=stripe /usr/sys/bin/btcreate
tar cvf /dev/rst0 / tar xvf /dev/rst0 LINUX(RedHat) /etc/rc.d/rc /boot/vmlinuz sysctl -a
ufsdump ufsrestore SOLARIS /etc/init.d /kernel/genunix sysdef -i
vdump vrestore Tru64 /sbin/init.d /vmunix sysconfig dxkerneltuner
/etc/rc
/kernel sysctl -a
cd /usr/src/linux
Reconfigure the kernel
chdev -l sys0 -a
make mrproper make menuconfig make dep cd /stand/build /usr/lbin/sysadm/system_prep -v -s make clean system cd /sys/i386/conf make bzImage vi system vi KERNEL make install mk_kernel -s system config KERNEL make modules cd ../../compile/KERNEL cd /stand make modules_install
make depend mv system system.prev mv vmunix vmunix.prev
vi /etc/system reboot
doconfig
cp
http://www.unixguide.net/unixguide.shtml
10/6/2011
UNIXguide.net ( AIX, FreeBSD, HP-UX, LINUX, SOLARIS & Tru64)
Page 5 of 6
make make install
mv dlkm dlkm.prev mv /stand/build/system system kmupdate /stand/build/vmunix_test
arch/i386/boot/bzImage /boot/vmlinuz2.2.16 mkinitrd /boot/initrd-2.2.16.img 2.2.16 vi /etc/lilo.conf lilo
List modules Load module Unload module Initialize system Physical RAM Kernel Bits Crash utility Trace System Calls Machine model OS Level Run Level Core dump files
genkex
kldstat kldload kldunload
kmadmin -s kmadmin -L kmadmin -U set_parms initial
lsmod insmod rmmod netconf
modinfo modload modunload sys-unconfig prtconf isainfo -kv crash truss uname -imp uname -r who -r /var/crash/`uname -n`
install_assist bootinfo -r bootinfo -K crash syscalls uname -m bootinfo -m oslevel who -r /var/adm/ras
/stand/sysinstall sysctl hw.physmem
netsetup
uerf | grep memory
grep -i free Physical /var/adm/syslog/syslog.log getconf KERNEL_BITS getconf LONG_BIT lcrash strace uname -m uname -r runlevel
64
kdbx trace uname -p sizer -v who -r
crash truss uname -m uname -r
adb tusc model uname -m uname -r who -r /var/adm/crash
{lilo} control-x linux S Key on service mode/F4 Boot single user Boot from CD/Tape Select Maintenance Limited function Shell ok boot -s >boot Interact with IPL ? Y ISL>hpux -iS {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
Maintenance mode Interrupt Key Return to console Timezone Management NTP Daemon Software Install Software installp -a Uninstall software List installed software installp -u lslpp -L all /etc/environment /etc/profile /etc/ntp.conf startsrc -s xntpd AIX
ok boot -as
>boot Interact with IPL ? Y ISL>hpux -lm control-B co
ok boot -as Stop-A ok go /etc/sysconfig/clock /etc/ntp.conf /etc/rc.d/init.d/xntpd LINUX(RedHat) rpm -i package rpm -e package rpm -qa rpm -V package rpm -ql package pkgadd pkgrm pkginfo pkginfo -i pkginfo -p pkgchk -l package patchadd -p rpm -qf file /var/lib/rpm LINUX(RedHat) /dev /devices pkgchk -l -p path /var/sadm SOLARIS /dev /var/adm/smlogs Tru64 /etc/TIMEZONE /etc/default/init /etc/inet/ntp.conf /etc/init.d/xntpd SOLARIS setld -l setld -d setld -i setld -v setld -i package dupatch -track -type patch /etc/svid3_tz timezone rcmgr set XNTPD_CONF YES /sbin/init.d/xntpd Tru64 control-P
/etc/localtime /etc/rc.conf {xntpd_enable="YES"} /etc/rc.network
/etc/TIMEZONE /etc/rc.config.d/netdaemons /sbin/init.d/xntpd HP-UX
pkg_add pkg_delete pkg_info -a
swinstall swremove swlist swlist -l fileset -a state
Verify installed lppchk -v software List all files List installed patches Package owner SW Directory Devices Devices /dev lslpp -f fileset instfix -i lslpp -w path /usr/lpp AIX /dev /var/db/pkg FreeBSD pkg_info -L package
swlist -l file fileset swlist -l patch what /stand/vmunix swlist -l file | grep path /var/adm/sw/ HP-UX /dev
http://www.unixguide.net/unixguide.shtml
10/6/2011
UNIXguide.net ( AIX, FreeBSD, HP-UX, LINUX, SOLARIS & Tru64)
Page 6 of 6
Install devices for attached peripherals Remove device Device drivers CPU List Terminal
cfgmgr -v
/dev/MAKEDEV
insf -e
/dev/MAKEDEV
drvconfig devlinks disks tapes ports rem_drv prtconf -D
scu scan edt scsimgr -scan_all
rmdev -l lscfg lsdev -Cc processor lsdev -Cc tty sysctl hw.model
rmsf lsdev ioscan -fnC processor ioscan -fnC tty lspci pnpdump /dev/sda /dev/cdrom iso9660 /dev/rst0 0} /dev/nrst0 128 } /dev/fd0 HP-UX HP-UX FAQ HP-UX Reference Manual IT Resource Center 1-800-633-3600 LINUX FAQ Linux Documentation Project Red Hat support 1-888-REDHAT1 Linux Software Map RHCE LINUX(RedHat) { c 9 { c 9 cat /proc/cpuinfo
psrinfo -v pmadm -l /usr/platform/`uname -m`/ sbin/prtdiag ok test-all /opt/SUNWvts/bin/sunvts /dev/c#t#d0s2 /dev/dsk/c#t6d0s2 hsfs /dev/rmt/0 /dev/rmt/0n /dev/diskette SOLARIS Solaris 2 FAQ Solaris 10 Documentation SunSolve 1-800-USA-4SUN Sun Freeware suned.sun.com
psrinfo -v
Diagnostics
diag
pciconf -l
stm
Whole Disk CDROM CDROM file type Rewinding tape drive Non-rewinding tape drive Floppy drive Links FAQ Online Manual Technical Support Phone Number Free Software Certification
/dev/hdisk# /dev/cd0 cdrfs /dev/rmt0 /dev/rmt0.1 /dev/rfd0 AIX AIX-FAQ AIX 5.3 Docs p5 TechSupport 1-800-CALL-AIX Public Domain Software Library www.ibm.com
/dev/ad0s1c /dev/acd0c cd9660 /dev/rwt0d /dev/nrwt0d /dev/fd0 FreeBSD
/dev/dsk/c#t#d0 /dev/dsk/c#t2d0 cdfs /dev/rmt/0m /dev/rmt/0mn -
/dev/rz0c /dev/rz3c cdfs /dev/rmt0 /dev/nrmt0 /dev/fd0c Tru64 Tru64 FAQ Tru64 Documents Alpha Systems Support 1-800-474-6836 Tru64 Demos, Shareware & Freeware ASE Information
FreeBSD FAQ FreeBSD Hand Book
FreeBSD Primary Site
HP-UX Ports education.hp.com
UNIXguide.net English to Cebuano Dictionary
Google Search
Suggest a Site Cebuano to English Dictionary
http://www.unixguide.net/unixguide.shtml
10/6/2011