Unix All Os Commands
Unix All Os Commands
Hermelito Go
Director
y
Mappings
AIX
Root
/
filesyst
{/dev/hd4}
em
FreeBSD
HP-UX
/
{/dev/ad0s1 {/dev/vg00/lvol1}
a}
Home
/home
Director
{/dev/hd1}
y
/home
{/dev/vg00/lvol4}
/tmp
{/dev/hd3}
/tmp
{/dev/vg00/lvol6}
/usr
{/dev/hd2}
/usr
(Last Update:
LINUX(RedHat)
/
{/dev/sda1}
SOLARIS
{/dev/rz0a}
/export/home
/dev/vx/dsk/home}
/tmp
/dev/vx/dsk/swapv
ol}
/usr
/var
/var
/var
{/dev/hd9var} {/dev/ad0s1 {/dev/vg00/lvol8}
e}
/var
/usr/newconfig
Tru64
/
{/dev/vx/dsk/root /
vol}
/usr
{/dev/ad0s1 {/dev/vg00/lvol7}
f}
Sample
configur
ation
files
/usr
{/dev/rz0g}
User
Accounts
AIX
FreeBSD
HP-UX
LINUX(RedHat)
Solaris
Tru64
/etc/passwd
/etc/shadow
/etc/passwd
/etc/group
/etc/group
/etc/group
65535
/etc/group
/etc/group
/etc/security
/group
/etc/group
/etc/logingroup
Maximum
# of
user ID
4294967295
2147483647
65535
2147483647
Allow/De
ny
remote
login
/
etc/security/ /etc/ttys
user
{secure}
{rlogin=true}
/etc/securetty
{console}
/etc/securetty
{ttyp1}
/
/etc/securettys
etc/default/login {ttyp1}
{CONSOLE=/dev/con
sole}
Groups
file
65535
User
4294967294
nobody's
id #
65534
-2
99
Group
4294967294
nobody's
id #
65534
-2(nogroup)
99
>boot
Interact with IPL ?
Y
ISL>hpux -iS
passwd root
{lilo}
control-x
linux S
passwd root
{grub}
c
kernel vmlinuz2.4.9-13 single
ro root=/dev/hda8
initrd /initrd2.4.9-13.img
boot
60001 &
65534(nobody4)
60002 &
65534(nogroup)
boot cdrom -s
mkdir /tmp/a
mount
/dev/c0t0d0s0
/tmp/a
vi
/tmp/a/etc/shadow
65534
65534
passwd root
Create
mkuser
new user
adduser
useradd
useradd
useradd
useradd
Delete
user
rmuser
rmuser
userdel
userdel
userdel
userdel
List
users
lsuser -f ALL
logins
Modify
user
account
chuser -a
usermod
General
Commands
Unique
host ID
AIX
FreeBSD
hostid
Administ
smit
rator
logins
usermod
HP-UX
usermod
LINUX(RedHat)
usermod
Solaris
Tru64
uname -i
hostid
hostid
hostid
sam
linuxconf
admintool
sysman
Performa
top
nce
monitor
monitor
top
top
glance
top
top
top
System
activity sar
reporter
sa
sar
sar {sysstat}
sar
/
usr/opt/svr4/bin/
sar
Virtual
Memory
vmstat
statisti
cs
vmstat
vmstat
vmstat
vmstat
vmstat
I/O
statisti iostat
cs
iostat
iostat
iostat {sysstat}
iostat
iostat
dmesg
dmesg
dmesg
dmesg
uerf -R -o full
Error
logs
alog -o -t
boot
errpt
Physical
1TB
RAM
4TB
64 GB {>2.3.24}
Shared
Memory
2.75GB
8TB
sysctl
kernel.shmmax
2GB
4GB
900 MB
/dev/vg00/lvol2
/dev/sda2
Process
Data
Space
Swap
device
/dev/hd6
/dev/ad0s1b
Swap
file
type
/
swap
etc/swapspace
s
swap
Display
swap
size
lsps -a
swapinfo
swapinfo -a
swapon -a
swapon -a
Activate
swapon -a
Swap
Printers
AIX
FreeBSD
16TB
4TB
/
/dev/rz0b
dev/vx/dsk/swapvo
l
swap
raw
free
swap -l
swapon -s
swapon -a
swap -a
swapon -a
partition type
82
HP-UX
LINUX
Solaris
Tru64
Printer
Queues
/etc/qconfig /
/etc/lp/interface/*
var/spool/p
rint
/
/
/usr/spool/lpd
var/spool/lpd/lp/ etc/lp/interfaces
*
/*
Stop LP
stopsrc -s
lpd
/etc/init.d/lpd
stop
/
/sbin/init.d/lpd
usr/lib/lp/lpshut stop
/etc/init.d/lpd
start
/
/sbin/init.d/lpd
usr/lib/lp/lpsche
start
d
Start LP
startsrc -s
lpd
lpshut
lpd
lpsched
Submit
print
jobs
enq
lp
lpr
qprt
lp
lp
lpr
LP
enq -A
lpq
lpstat
lpq
lp
lpr
lp
lpr
lpstat
lpstat
lpq
statisti
lpstat
cs
qchk
Remove
print
jobs
cancel
lprm
qcan
enq -x
Add
printer
queue
cancel
lprm
cancel
lprm
cancel
lprm
smit mkpq
lpadmin -p pq
printtool
lpadmin -p pq
lprsetup
Remove
Printer
queue
smit rmpq
lpadmin -x pq
lpadmin -x pq
lprsetup
Make
default
printer
export
LPDEST="pq"
lpadmin -d pq
lpadmin -d pq
export
PRINTER="lp"
TCP/IP
cancel
lprm
AIX
HP-UX
LINUX(RedHat)
Solaris
Tru64
Network
/
/
IP
lsattr -E -l /
etc/rc.config.d/netc etc/sysconfig/net
configur inet0
etc/rc.conf
onf
work-scripts/
ation
/etc/hostname.*
/etc/inet/*
/etc/rc.config
/etc/defaultroute
r
Hosts IP
addresse /etc/hosts
s
/etc/inet/hosts
Name
service
switch
/etc/hosts
/etc/hosts
/
/
etc/netsvc.co etc/host.co /etc/nsswitch.conf
nf
nf
/etc/hosts
/
/
/etc/svc.conf
etc/nsswitch.conf etc/nsswitch.conf
Network
paramete no -a
rs
sysctl
ndd -h
sysctl -a | grep
net
ndd /dev/[tcp|ip]
?
Routing
daemon
routed
gated
routed
in.routed
gated
/etc/hosts
routed
NIC
Configur ifconfig -a
ations
ifconfig -a lanscan -v
Secondar
ifconfig
ifconfig en0
y IP
xl0 alias
alias IP
Address
IP
Login
prompt
HERALD @
/etc/security
/login.cfg
odmget -q
"attribute=nu
m and
uniquetype=pt
y/pty/pty"
PdAt | sed
"s/0-64/0Increase 512/" |
the # of odmchange -q
pseudo- "attribute=nu
terminal m and
s
uniquetype=pt
y/pty/pty" -o
PdAt
ifconfig -a
ifconfig lan0:1 IP
modprobe ip_alias
ifconfig hme0:1
ifconfig eth0:1
IP up
IP
telnetd -b
/etc/issue
/etc/issue
512
Remote
Shell
remsh
rsh
YP/NIS
ifconfig -a
ifconfig ln0
alias
BANNER @
/etc/default/teln /etc/issue
etd
{/etc/system}
set pt_cnt = #
{SYSV}
set npty = #
{BSD}
cd /dev
./MAKEDEV -v pty
insf -d ptys -n #
insf -d ptym -n #
insf -d pts -s # -e
-v
{/etc/iu.ap}
ptsl 0 # ldterm
ttcompat
cd /dev
./MAKEDEV PTY_1
halt
boot -r
chdev -l pty0
-anum=256 -P
reboot
Maximum
# of
ptys
ifconfig -a
{MAXUSERS}
256
176
{BSD}
3000
{SYSV}
rsh
remsh
rsh
rsh
rsh
/sbin/ypbind
/usr/sbin/ypbind
8192
service
binder
System
Files
AIX
FreeBSD
HP-UX
usr/lib/netsvc/yp
/ypbind
LINUX(RedHat)
Solaris
Tru64
NFS
/
/etc/exports
/etc/exports
exported
etc/exports
/etc/exports
NFS
Client
mounted /etc/xtab
director
ies
/etc/xtab
/var/lib/nfs/xtab /etc/rmtab
Max File
128 GB
System
128 GB
2 TB
1 TB
8000 TB {vxfs}
Max File
64 GB
Size
128 GB
2 GB
{512B
block size}
8192 GB {8KB
block size}
1 TB
2 GB {=<2.5.1}
Max #
File
64 K
Descript
ors
60~ K
sysctl fs.filemax
64 K
64 K
DISK/LVM
Commands
AIX
HP-UX:Disk
&Filesystem
FreeBSD
/etc/dfs/dfstab
/etc/exports
/etc/dfs/sharetab
LINUX(RedHat)
/
var/adm/mountdtab
SOLARIS
Tru64
/
Filesyst
etc/filesyste /etc/fstab
em table
ms
/etc/fstab
/etc/fstab
/etc/vfstab
/etc/fstab
Free
disk
blocks
df -k
bdf
df -k
df -k
df -k
Device
listing
lsdev -C
/sbin/ioscan
Disk
bootinfo -s
diskinfo
cat
df -k
fdisk -v
format -d c#t#d#
file /dev/rrz0c
informat
hdisk#
ion
ad0
/dev/rdsk/c#t#d#
/proc/scsi/scsi0/ format>current
sda/model
format>inquiry
Disk
Label
disklabel
ad0
pvdisplay -v
/dev/dsk/C#t#d#
fdisk -l
prtvtoc
disklabel -p rz0
sub disk
logical extents
logical extents
sub disk
sub disk
Volume
logical volume
logical volume
Volume
Volume
Plex
Plex
lspv -l
hdisk#
LVM
Partition
Concepts
Volume
Plex
Volume group
volume group
volume group
disk group
disk group
Journal
Filesyst jfs
em type
vxfs
ext3
reiserfs
vxfs
advfs
Default
volume
group
/dev/rootvg
/dev/vg00
Display
volume
group
lsvg -l
rootvg
vgdisplay -v vg00
vgdisplay -v
Modify
physical chpv
volume
pvchange
pvchange
Prepare
mkdev -c disk
physical
-l hdisk#
disk
pvcreate
List
physical lspv
volume
Remove
disk
from
volume
group
reducevg
vinum ld
/
/dev/vol/rootdg
dev/vx/dsk/rootdg
vxprint -l -g
rootdg
volprint -l -g
rootdg
pvcreate
vxdiskadd
voldiskadd
pvdisplay
pvdisplay
vxprint -dl
volprint -dl
vgreduce
vgreduce
vxdg rmdisk
voldg rmdisk
Move
logical
volumes
to
migratepv
another
physical
volumes
vinum move
-f drive
object
pvmove
pvmove
vxassist move
volassist move
vgcreate
vgcreate
vxdg init
voldg init
Remove
volume
group
vgremove
vgremove
Volume
chvg
group
varyonvg
availabi
varyoffvg
lity
vgchange
vgchange
Restore
volume
group
vgcfgrestore
vgcfgrestore
Create
volume
group
mkvg
Exports
volume
group
exportvg
vgexport
vgexport
vxdg deport
voldg deport
Imports
volume
group
importvg
vgimport
vgimport
vxdg import
voldg import
Volume
group
listing
lsvg
vgscan
vgscan
lvchange
lvchange
vxedit set
voledit set
Change
logical
volume
chlv
characte
ristics
List
logical
volume
lslv
Make
logical
volume
vinum lv
lvdisplay
lvdisplay
vxprint -vl
volprint -vl
mklv
lvcreate
lvcreate
vxassist make
volassist make
Extend
logical
volume
extendlv
lvextend
lvextend
vxassist growto
volassist growto
Reduce
logical
volume
AIX reduce LV
lvreduce
lvreduce
vxassist shrinkto
volassist
shrinkto
Remove
logical
volume
rmlv
lvremove
lvremove
vxedit rm
voledit -g rootdg
-rf rm vol1
Prepare
boot
volumes
bootlist -m
normal
lvlnboot
lilo
vxbootsetup
extendfs
/dev/vg00/lvol8
fsadm -F vxfs -b
{LE * 1024} /mt
resize2fs
resize_reiserfs
vxva
mkfs -M
Reduce/S
plit
rmlvcopy
mirrors
lvsplit
lvsplit
Merge
mirrors
lvmerge
lvmerge
vinum rm
vol
Remove
boot
volumes
Extend
File
system
Create
mirrors
lvrmboot
chfs -a
size=# /mt
mklv -c 2
vinum
mirror
drive
lvcreate -m 1
vxassist mirror
volassist make
vol 100mb
mirror=true
Add
mirrors
mklvcopy lv
2
lvextend -m 1
Create
striped
volumes
vinum
mklv -u 3 -S
stripe
64K
drive
lvcreate -i 3 -I 64
System
mksysb -i
recovery
/dev/rmt0
tape
Backup
savevg -i
rootvg
Restore
restvg
MISC
AIX
lvcreate -i 3 -I
64
/
opt/ignite/bin/make_
recovery
vinum
saveconfig
FreeBSD
Startup
script
/etc/rc
Kernel
/
usr/lib/boot/ /kernel
unix_up
/etc/rc
/
usr/sys/bin/btcre
ate
fbackup
vdump
frecover
tar xvf
/dev/rst0
vrestore
HP-UX
LINUX(RedHat)
ufsrestore
SOLARIS
Tru64
/sbin/rc
/etc/rc.d/rc
/etc/init.d
/sbin/init.d
/stand/vmunix
/boot/vmlinuz
/kernel/genunix
/vmunix
Kernel
lsattr -E -l
Paramete
sysctl -a
sys0
rs
sysdef
kmtune
kmsystem
sysctl -a
sysdef -i
sysconfig
dxkerneltuner
Reconfig
cd
ure the chdev -l sys0 /sys/i386/c
kernel
onf
-a
vi KERNEL
config
KERNEL
cd
../../compi
le/KERNEL
make depend
make
make
cd /stand/build
cd
vi /etc/system
/usr/lbin/sysadm/sys /usr/src/linux
reboot
tem_prep -v -s
make mrproper
system
make menuconfig
vi system
mk_kernel -s system make dep
make clean
cd /stand
mv system
make bzImage
system.prev
make install
mv vmunix
make modules
vmunix.prev
make modules_install
mv dlkm dlkm.prev
doconfig
cp
arch/i386/boot/bzIma
ge /boot/vmlinuz2.2.16
mkinitrd /boot/initrd2.2.16.img 2.2.16
vi /etc/lilo.conf
lilo
install
mv
/stand/build/system
system
kmupdate
/stand/build/vmunix_
test
kldstat
kmadmin -s
lsmod
modinfo
Load
module
kldload
kmadmin -L
insmod
modload
Unload
module
kldunload
kmadmin -U
rmmod
modunload
netconf
sys-unconfig
netsetup
grep -i Physical
/var/adm/syslog/sysl free
og.log
prtconf
uerf | grep
memory
getconf KERNEL_BITS
getconf WORD_BIT
isainfo -kv
64
List
modules
genkex
Initiali
/
install_assis
ze
stand/sysin set_parms initial
t
system
stall
Physical
bootinfo -r
RAM
sysctl
hw.physmem
Kernel
Bits
bootinfo -K
Crash
utility
crash
crash
adb
lcrash
crash
kdbx
Trace
System
Calls
syscalls
truss
tusc
strace
truss
trace
Machine
model
uname -m
bootinfo -m
uname -m
model
uname -m
uname -m
uname -imp
uname -p
uname -r
uname -r
uname -r
uname -r
sizer -v
OS Level oslevel
Run
Level
who -r
who -r
Core
dump
files
/var/adm/ras
/var/adm/crash
Boot
single
user
Key on
service
mode/F4
Boot from
CD/Tape
Select
Maintenance
Limited
function
Shell
Maintena
nce mode
runlevel
who -r
/var/crash/`uname
-n`
{lilo}
control-x
linux S
ok boot -s
>boot
Interact with IPL ?
Y
ISL>hpux -iS
>boot
Interact with IPL ?
ok boot -as
Y
ISL>hpux -lm
{grub}
c
ok boot -s
kernel vmlinuz2.4.9-13 single
ro root=/dev/hda8
initrd /initrd2.4.9-13.img
boot
control-B
Stop-A
Return
to
console
co
ok go
/
Timezone
/
etc/environme
Manageme
etc/localti /etc/TIMEZONE
nt
nt
me
/etc/profile
/etc/ntp.conf /
startsrc -s etc/rc.conf
xntpd
{xntpd_enab
le="YES"}
ok boot -as
Interrup
t Key
NTP
Daemon
who -r
control-P
/
/etc/TIMEZONE
/etc/svid3_tz
etc/sysconfig/clo
/etc/default/init timezone
ck
/
/etc/ntp.conf
/
etc/rc.config.d/netd /etc/rc.d/init.d/ etc/inet/ntp.conf
aemons
xntpd
/etc/init.d/xntpd
/sbin/init.d/xntpd
/etc/rc.net
work
Software
AIX
HP-UX
LINUX(RedHat)
SOLARIS
Tru64
Install
installp -a
Software
pkg_add
swinstall
rpm -i package
pkgadd
setld -l
Uninstal
l
installp -u
software
pkg_delete
swremove
rpm -e package
pkgrm
setld -d
rpm -qa
pkginfo
setld -i
pkginfo -i
pkginfo -p
setld -v
List
installe
lslpp -L all pkg_info -a swlist
d
software
Verify
installe
lppchk -v
d
software
List all lslpp -f
files
fileset
swlist -l fileset -a
rpm -V package
state
pkg_info -L swlist -l file
package
fileset
List
installe
instfix -i
d
patches
swlist -l patch
what /stand/vmunix
Package
owner
swlist -l file |
grep path
lslpp -w path
SW
Director /usr/lpp
y
Devices
AIX
/var/db/pkg /var/adm/sw/
FreeBSD
HP-UX
Devices
/dev
/dev
/dev
Install
devices
for
cfgmgr -v
/
insf -e
dev/MAKEDEV
patchadd -p
pkgchk -l -p path
/var/lib/rpm
/var/sadm
LINUX(RedHat)
dupatch -track
-type patch
/var/adm/smlogs
SOLARIS
Tru64
/dev
/devices
/dev
/dev/MAKEDEV
drvconfig
devlinks
disks
attached
peripher
als
tapes
ports
Remove
device
rmdev -l
rmsf
rem_drv
Device
drivers
lscfg
lsdev
prtconf -D
CPU
lsdev -Cc
processor
sysctl
hw.model
List
lsdev -Cc tty
Terminal
ioscan -fnC
processor
pmadm -l
psrinfo -v
Diagnost
diag
ics
pciconf -l
stm
lspci
pnpdump
/
usr/platform/`una
me -m`/
sbin/prtdiag
ok test-all
/opt/SUNWvts/bin/
sunvts
Whole
Disk
/dev/hdisk#
/dev/ad0s1c /dev/dsk/c#t#d0
/dev/sda
/dev/c#t#d0s2
CDROM
/dev/cd0
/dev/acd0c
/dev/dsk/c#t2d0
/dev/cdrom
/dev/dsk/c#t6d0s2 /dev/rz3c
CDROM
file
type
cdrfs
cd9660
cdfs
iso9660
hsfs
cdfs
Rewindin
g tape
/dev/rmt0
drive
/dev/rwt0d
/dev/rmt/0m
/dev/rst0
{ c 9 0}
/dev/rmt/0
/dev/rmt0
Nonrewindin
/dev/rmt0.1
g tape
drive
/dev/nrwt0d /dev/rmt/0mn
/dev/nrst0
{ c 9 128 }
/dev/rmt/0n
/dev/nrmt0
Floppy
drive
/dev/fd0
/dev/fd0
/dev/diskette
/dev/fd0c
/dev/rfd0
/dev/rz0c
Links
AIX
FreeBSD
HP-UX
LINUX(RedHat)
SOLARIS
Tru64
FAQ
AIX-FAQ
FreeBSD
FAQ
HP-UX FAQ
LINUX FAQ
Solaris 2 FAQ
Tru64 FAQ
Online
Manual
FreeBSD
Hand Book
HP-UX 11.00
Collection
Linux
Documentation
Project
Solaris 7
Documentation
Tru64 Documents
Technica
RS/6000
l
TechSupport
Support
IT Resource Center
SunSolve
Alpha Systems
Support
Phone
Number
1-800-633-3600
1-888-REDHAT1
1-800-USA-4SUN
Linux Software
Map
Sun Freeware
Tru64 Demos,
Shareware &
Freeware
RHCE
suned.sun.com
ASE Information
1-800-CALLAIX
Free
Bull
Software
Certific
www.ibm.com
ation
UNIXguide.net
FreeBSD
HP-UX Ports
Primary Site
education.hp.com
Find:
Display:
page
Search
hits per
Suggest a Site