레이블이 비교인 게시물을 표시합니다. 모든 게시물 표시
레이블이 비교인 게시물을 표시합니다. 모든 게시물 표시

2020년 2월 19일 수요일

Unix명령어 비교

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