0% found this document useful (0 votes)
10 views

UNIX-Command-Compilations

Uploaded by

abdel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

UNIX-Command-Compilations

Uploaded by

abdel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

User Administrations Solaris HP-UX AIX

Password files /etc/passwd /etc/passwd /etc/passwd


/etc/shadow /tcb/files/auth/r/root /etc/security/passwd
Groups file /etc/group /etc/group /etc/group
/etc/logingroup /etc/security/group
Maximum # of user ID 2147483647 2147483647 4294967295
Allow/Deny remote login /etc/default/login /etc/securetty /etc/security/user
{CONSOLE=/dev/console} {console} {rlogin=true}
User nobody's id # 60001 & 65534(nobody4) -2 4294967294
Group nobody's id # 60002 & 65534(nogroup) -2(nogroup) 4294967294
Recover root password boot cdrom -s >boot boot from CD/Tape
mkdir /tmp/a Interact with IPL ? Y Installation/Maintenance
mount /dev/c0t0d0s0 ISL>hpux -iS Start Limited Shell
/tmp/a passwd root getrootfs hdisk0
vi /tmp/a/etc/shadow vi /etc/security/passwd
Create new user useradd useradd mkuser
Delete user userdel userdel rmuser
List users logins logins lsuser -f ALL
Modify user account usermod usermod chuser -a
General Commands Solaris HP-UX AIX
Unique host ID hostid uname -i hostid
Administrator admintool sam smit / smitty
Performance monitor top top top
glance monitor
System activity reporter sar sar sar
Virtual Memory statistics vmstat vmstat vmstat
I/O statistics iostat iostat iostat
Error logs dmesg dmesg alog -o -t boot
errpt
Swap device /dev/dsk/c0t0d0s1 (e.g) /dev/vg00/lvol2
Swap file type swap swap /etc/swapspaces
Display swap size swap -l swapinfo -a lsps -a
Activate Swap swap -a swapon -a swapon -a
Printers Solaris HP-UX AIX
Printer Queues /etc/lp/interfaces/* /etc/lp/interface/* /etc/qconfig
Stop LP /usr/lib/lp/lpshut lpshut stopsrc -s lpd
Start LP /usr/lib/lp/lpsched lpsched startsrc -s lpd
Submit print jobs lp lp enq
lpr lp
lpr
qprt
LP statistics lpstat lpstat enq -A
lpq
lpstat
qchk
Remove print jobs cancel cancel cancel
lprm lprm
qcan
enq -x
Add printer queue lpadmin -p pq lpadmin -p pq smit mkpq
Remove Printer queue lpadmin -x pq lpadmin -x pq smit rmpq
Make default printer lpadmin -d pq lpadmin -d pq export LPDEST="pq"
Networking TCP/IP Solaris HP-UX AIX
Network IP configuration /etc/hostname.* /etc/rc.config.d/netconf lsattr -E -l inet0
/etc/inet/*
/etc/defaultrouter
Hosts IP addresses /etc/inet/hosts /etc/hosts /etc/hosts
Name service switch /etc/nsswitch.conf /etc/nsswitch.conf /etc/netsvc.conf
Network parameters ndd /dev/[tcp|ip] ? ndd -h no -a
Routing daemon in.routed gated gated
NIC Configurations ifconfig -a lanscan -v ifconfig -a
Secondary IP Address ifconfig hme0:1 IP up ifconfig lan0:1 IP ifconfig en0 alias IP
Login prompt BANNER @ telnetd -b /etc/issue HERALD @
/etc/default/telnetd /etc/security/login.cfg
Increase the # of pseudo- {/etc/system} rebuild your kernel with odmget -q "attribute=num and
terminals set pt_cnt = # {SYSV} these new values NPTY=# uniquetype=pty/pty/pty" PdAt
set npty = # {BSD} NSTRPY=# | sed "s/0-64/0-512/" |
odmchange -q "attribute=num
{/etc/iu.ap} and uniquetype=pty/pty/pty"
-o PdAt
ptsl 0 # ldterm ttcompat reboot
chdev -l pty0 -anum=256 -P
halt insf -d ptys -n # reboot
boot -r insf -d ptym -n #
insf -d pts -s # -e -v

Remote Shell rsh remsh remsh


rsh
YP/NIS service binder /usr/lib/netsvc/yp/ypbind /usr/lib/netsvc/yp/ypbind /usr/lib/netsvc/yp/ypbind
System Files Solaris HP-UX AIX
NFS exported /etc/dfs/dfstab /etc/exports /etc/exports
/etc/dfs/sharetab
NFS Client mounted /etc/rmtab /etc/xtab /etc/xtab
directories
DISK/LVM Commands SOLARIS HP-UX AIX
Filesystem table /etc/vfstab /etc/fstab /etc/filesystems
Free disk blocks df -k bdf df -k
Device listing sysdef /sbin/ioscan lsdev -C
Available Disks echo|format /sbin/ioscan -fnCdisk
Disk information format -d c#t#d# diskinfo /dev/rdsk/c#t#d# bootinfo -s hdisk#
format>current
format>inquiry
Disk Label prtvtoc pvdisplay -v lspv -l hdisk#
/dev/dsk/C#t#d#
LVM Concepts sub disk (with VxVM) logical extents Partition
Volume logical volume Volume
Plex
disk group volume group Volume group
Journal Filesystem type vxfs vxfs jfs
Default volume group /dev/vx/dsk/rootdg /dev/vg00 /dev/rootvg
Display volume group vxprint -l -g rootdg vgdisplay -v vg00 lsvg -l rootvg
Modify physical volume pvchange chpv
Prepare physical disk vxdiskadd pvcreate mkdev -c disk -l hdisk#
List physical volume vxprint -dl pvdisplay lspv
Remove disk from volume vxdg rmdisk vgreduce reducevg
group
Move logical volumes to vxassist move pvmove migratepv
another physical volumes
Create volume group vxdg init vgcreate mkvg
Remove volume group vgremove
Volume group availability vgchange chvg
varyonvg
varyoffvg
Restore volume group vgcfgrestore
Exports volume group vxdg deport vgexport exportvg
Imports volume group vxdg import vgimport importvg
Volume group listing vgscan lsvg
Change logical volume vxedit set lvchange chlv
characteristics
List logical volume vxprint -vl lvdisplay lslv
Make logical volume vxassist make lvcreate mklv
Extend logical volume vxassist growto lvextend extendlv
Reduce logical volume vxassist shrinkto lvreduce AIX reduce LV
Remove logical volume vxedit rm lvremove rmlv
Prepare boot volumes vxbootsetup lvlnboot bootlist -m normal
Remove boot volumes lvrmboot
Extend File system vxva extendfs /dev/vg00/lvol8 chfs -a size=# /mt
mkfs -M fsadm -F vxfs -b
{LE * 1024} /mt
Reduce/Split mirrors lvsplit rmlvcopy
Merge mirrors lvmerge
Create mirrors vxassist mirror lvcreate -m 1 mklv -c 2
Add mirrors lvextend -m 1 mklvcopy lv 2
Create striped volumes vxassist make vol 100mb lvcreate -i 3 -I 64 mklv -u 3 -S 64K
layout=raid5
System recovery tape /opt/ignite/bin/ mksysb -i /dev/rmt0
make_recovery
Backup ufsdump fbackup savevg -i rootvg
Restore ufsrestore frecover restvg
MISC SOLARIS HP-UX AIX
Startup scripts /etc/init.d/ /sbin/rc.d/ /etc/rc
Kernel /kernel/genunix /stand/vmunix /usr/lib/boot/unix_up
Kernel Parameters sysdef -i sysdef lsattr -E -l sys0
kmtune
kmsystem
Reconfigure the kernel vi /etc/system cd /stand/build
reboot /usr/lbin/sysadm/system_pr chdev -l sys0 -a
ep -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
List modules modinfo kmadmin -s genkex
Load module modload kmadmin -L
Unload module modunload kmadmin -U
Initialize system sys-unconfig set_parms initial install_assist
Physical RAM prtconf grep -i Physical bootinfo -r
/var/adm/syslog/syslog.log
Kernel Bits isainfo -kv getconf KERNEL_BITS bootinfo -K
Crash utility crash adb crash
Trace System Calls truss tusc syscalls
Machine model uname -imp model uname -m
uname -m bootinfo -m
OS Level uname -r uname -r oslevel
Run Level who -r who -r who -r
Core dump files /var/crash/`uname -n` /var/adm/crash /var/adm/ras
Boot single user ok boot -s >boot Key on service mode/F4
Interact with IPL ? Y Boot from CD/Tape
ISL>hpux -iS Select Maintenance
Limited function Shell
Maintenance mode ok boot -as >boot
Interact with IPL ? Y
ISL>hpux -lm
Interrupt Key Stop-A control-B
Return to console ok go co
Timezone Management /etc/TIMEZONE /etc/TIMEZONE /etc/environment
/etc/default/init /etc/profile
NTP Daemon /etc/inet/ntp.conf /etc/rc.config.d/ /etc/ntp.conf
/etc/init.d/xntpd netdaemons startsrc -s xntpd
/sbin/init.d/xntpd
Software SOLARIS HP-UX AIX
Install Software pkgadd swinstall installp -a
Uninstall software pkgrm swremove installp -u
List installed software pkginfo swlist lslpp -L all
Verify installed software pkginfo -i swlist -l fileset -a state lppchk -v
pkginfo -p
List all files pkgchk -l package swlist -l file fileset lslpp -f fileset
List installed patches patchadd -p swlist -l patch instfix -i
what /stand/vmunix
Package owner pkgchk -l -p path swlist -l file | grep path lslpp -w path
SW Directory /var/sadm /var/adm/sw/ /usr/lpp
Devices SOLARIS HP-UX AIX
Devices /devices /dev /dev
Install devices for drvconfig insf -e cfgmgr -v
attached peripherals devlinks
disks
tapes
ports
Remove device rem_drv rmsf rmdev -l
Device drivers prtconf -D lsdev lscfg
CPU psrinfo -v ioscan -fnC processor lsdev -Cc processor
List Terminal pmadm -l ioscan -fnC tty lsdev -Cc tty
Diagnostics /usr/platform/`uname -m`/ stm diag

sbin/prtdiag
ok test-all
/opt/SUNWvts/bin/sunvts
Whole Disk /dev/c#t#d0s2 /dev/dsk/c#t#d0 /dev/hdisk#
CDROM /dev/dsk/c#t6d0s2 /dev/dsk/c#t2d0 /dev/cd0
CDROM file type hsfs cdfs cdrfs
Rewinding tape drive /dev/rmt/0 /dev/rmt/0m /dev/rmt0
Non-rewinding tape drive /dev/rmt/0n /dev/rmt/0mn /dev/rmt0.1
Floppy drive /dev/diskette - /dev/rfd0
Tools Solaris HP-UX AIX
Tool Name nickel
SUNWexplo
How to execute sh /opt/contrib/bin/nickel
/opt/SUNWexplo/bin/explorer
Output file location /opt/SUNWexplo/output/* /tmp/nickel.$hostname
/opt/contrib/bin/nickel/
*.tar.gz

You might also like