Académique Documents
Professionnel Documents
Culture Documents
A Sysadmin's Unixersal Translator (ROSETTA STONE) OR What do they call that in this world?
Contributions and corrections gratefully accepted. Please help us fill in the blanks. New "tasks" are welcome, too!
PDF version (for best results print US legal size, landscape orientation. If your browser plug-in has trouble with the PDF, then download it and load it in stand-alone acroread).
Framed version.
OS versions in parentheses; e.g. 10+ means version 10 and greater; 9- means version 9 and previous. $=extra cost. (obs) = obsolete
If not specified, commands are in one of the following directories: /usr/bin, /usr/sbin, /bin, /sbin
Files referenced may be either commands, configuration files, or directly-referenced text files. Use the man command to read the man pages for details such as command options.
Categories:
hardware, firmware, devices disks kernel, boot, swap files, volumes
networking security, backup software, patching, tracing, logging references
TASK \ OS AIX FreeBSD Linux Mac OS X OpenBSD Solaris OS / TASK
(rh) = Red Hat,
Mandrake, SUSE,... Forked from NetBSD in
By IBM, with input from Derived from 4.4BSD-Lite and Solaris 2.0-2.6, 7, 8, 9, 10
(deb) = Debian, Libranet,... Darwin is the Open Source 1995. Security emphasis.
System V, BSD, etc. Runs 386BSD. This table does not OpenSolaris
OS notes (fed) = Fedora foundation for Mac OS X, This table does not OS notes
mainly on IBM RS/6000 and include external packages (gen) = Gentoo (SunOS 5.*)
descended from NeXTStep include external packages
related hardware. from /usr/ports. (md) = Mandrake/Mandriva SVR4-based
(SUSE) = SUSE
from /usr/ports.
(rh, FC2+, RHEL4+)
/stand/sysinstall system-config*
smit pw (rh) redhat-config* solstice
Aqua: System Preferences,
administrative GUI smitty adduser rmuser linuxconf (obsolete) ? admintool administrative GUI
NetInfo Manager
wsm vipw (SUSE) yast2 smc (8 01/01+)
chpass (deb) dpkg-reconfigure
(md) drakconf
useradd (5+)
userdell (5+) useradd
useradd useradd
usermod (5+) adduser userdel
usermod Aqua: System userdel
lsuser rmuser usermod
managing users userdel Preferences / Accounts adduser (interactive) managing users
mkuser pw logins
adduser niutil usermod
chuser vipw /usr/sadm/bin/smuser (9+)
chage user
rmuser groupadd
usrck
TASK \ OS AIX FreeBSD Linux Mac OS X OpenBSD Solaris OS / TASK
dmesg (if you're lucky)
prtconf -v
cat /var/log/dmesg
/usr/platform/`uname -i`/
/proc/*
sbin/prtdiag -v (sun4u and sun4d only)
lshw
sysctl -a sysctl hw arch -k
prtconf dmidecode
dmesg hostinfo dmesg psrinfo -v
lscfg lspci
list hardware configuration cat /var/run/dmesg.boot ioreg -bls cat /var/run/dmesg.boot isainfo -v list hardware configuration
lsattr lspnp
pciconf -l system_profiler pcidump dmesg
lsdev lsscsi
eeprom (SPARC only) acpidump iostat -En
lsusb
prtfru
lsmod
cfgadm -l
(SUSE) hwinfo
/etc/path_to_inst
/sys/devices/*
system_profiler
uname -u
SPHardwareDataType |
unique id useful for licensing uname -m ? ? ? hostid unique id useful for licensing
grep "Serial Number:" |
lsattr -El sys0 -a systemid
awk '{print $3}'
show/set /dev/nvram (if you have it) show/set
eeprom
EEPROM/NVRAM bootlist -o -m normal ? hwclock nvram eeprom EEPROM/NVRAM
values nvsetenv values
http://bhami.com/rosetta.html 06/11/2008
Rosetta Stone for Unix Página 2 de 8
udev (2.6+)
devfsadm. pre-Solaris 7 HW 11/99, use:
modprobe
camcontrol drvconfig; devlinks; {disks, tapes, ports}
kerneld (automatic —
add device without reboot cfgmgr -v atacontrol (auto-detected) add device without reboot
insmod autdodiskmounter)
kldload /usr/lib/symsm/bin/hot_add (RDAC)
hotplug
/etc/symsm/rmparams (RDAC)
cardctl
remove device rmdev ? ? ? ? devfsadm remove device
tape device /dev/rmt0 /dev/rsa0 /dev/st0 ? /dev/[e][n][r]st[0-9]* /dev/rmt/0 tape device
/dev/stdin
/dev/stdout
stdin/ stdout/ stderr ? /dev/fd/[012] /dev/fd/[012] /dev/fd/[012] /dev/fd/[012] stdin/ stdout/ stderr
/dev/stderr
/dev/fd/[012]
xorgcfg
xorgconfig
Xorg -configure
Xorg -configure system-config-display kdmconfig (x86)
X kvm config ? ? X -configure X kvm config
xf86config xf86config fbconfig; m64config; (etc.)
XFree86 -configure
redhat-config-xfree86
/etc/X11/?dm
TASK \ OS AIX FreeBSD Linux Mac OS X OpenBSD Solaris OS / TASK
pdisk rawDev -dump
read a disk label lspv -l disklabel -r fdisk -l disklabel diskName prtvtoc read a disk label
Disk Utility
/dev/hda (e.g. if /dev/hda1 (non-root partitions are
whole disk in partition N/A c c 2 whole disk in partition
is a partition) mounted under /Volumes)
fdisk cfdisk format
label a disk mkvg disklabel -wr fdisk (labels unused) disklabel -E diskName prtvtoc label a disk
sysinstall e2label (x86) fdisk
parted (if you have it)
cfdisk
fdisk fdisk format
partition a disk mklv pdisk fdisk -e diskName partition a disk
sysinstall pdisk (on a MAC) fmthard
(deb) mac-fdisk (on a MAC)
(md) diskdrake
TASK \ OS AIX FreeBSD Linux Mac OS X OpenBSD Solaris OS / TASK
/boot/vmlinuz* /kernel/genunix
/boot/bootlx /platform/`uname -m`/
/kernel
kernel /unix /mach_kernel /bsd kernel/unix kernel
/boot/kernel/kernel
(see /etc/lilo.conf /platform/`uname -m`/
or /boot/grub/menu.lst) kernel/sparcv9/unix (7+)
sysdef
/boot/kernel.conf /proc/*
vmo /usr/sbin/sysctl getconf
/boot/loader.conf /proc/sys/* sysctl
show/set kernel parameters ioo launchctl limit cat /etc/system show/set kernel parameters
sysctl sysctl /etc/sysctl.conf
schedo /etc/launchd.conf ndd
/etc/sysctl.conf /etc/sysctl.conf
adb -k
mem= (in lilo.conf nvram machine memory (at the
limit physical memory rmss ? ? limit physical memory
or /boot/grub/grub.conf) bootargs="maxmem=MB" "boot" prompt)
loaded kernel modules genkex kldstat lsmod kextstat modstat modinfo loaded kernel modules
modprobe
load module ? kldload kextload modload modload load module
insmod
rmmod
unload module ? kldunload kextunload modunload modunload unload module
modprobe -r
(rh) mkbootdisk installboot /usr/platform/
boot0cfg /usr/mdec/installboot5
make disk bootable bosboot -a (deb) fdisk -A bless `uname -i` make disk bootable
disklabel
(and lilo to manipulate mbr) /usr/mdec/biosboot5 /lib/fs/ufs/bootblk raw_device_file
/System/Library/ /etc/rc*
/etc/rc* (4-) /etc/rc* (but may vary) StartupItems/*, /etc/init.d/
http://bhami.com/rosetta.html 06/11/2008
Rosetta Stone for Unix Página 3 de 8
meta*
smitty vg vinum
(Solstice DiskSuite;
smitty lvm ccdconfig e2fsadm
ccdconfig Solaris Volume Mgr (9+))
smitty jfs geom (5.3+) lvcreate
volume manipulation Disk Utility / pdisk / diskutil raidctl (7-, found in volume manipulation
mkvg; chvg; rmvg gstripe (5.3+) lvremove
bioctl /usr/opt/SUNWmd/
mklv; chlv; rmlv gmirror (5.3+) lvextend
sbin/)
mkfs; crfs; rmfs graid3 (5.3+)
/opt/VRTSvxva/bin/vxva
(Veritas Volume Mgr) ($)
mke2fs
newfs
mkreiserfs newfs
create filesystem crfs newfs newfs_hfs newfs create filesystem
mkdosfs mkfs
newfs_mdos
mkfs.*
fsck
dfsck fsck fsck fsck fsck
file system debugging and fsdb file system debugging and
fsck fsdb debugfs fsdb fsdb
recovery clri recovery
fsdb clri e2undel clri clri
scan_ffs
dd if=/dev/zero
of=filename bs=1024
http://bhami.com/rosetta.html 06/11/2008
Rosetta Stone for Unix Página 4 de 8
count=desired
truncate -s size[K|M|G] filename
mkfile
dd if=/dev/zero of=filename dd if=/dev/zero of=filename dd if=/dev/zero
create non-0-length empty file lmktemp dd if=/dev/zero of=filename mkfile create non-0-length empty file
bs=size[b|k|m|g] \ bs=1024k count=desired of=filename bs=1 count=1
bs=1024 count=desired
count=desired seek=desired-1
(sparse file)
mount -v cdrfs -o ro
(automatic — automounter) /etc/init.d/vold start; volcheck or
/dev/cd0 /cdrom mount /cdrom mount /mnt/cdrom
mount CDROM mount /dev/cd0a path mount -F hsfs -o mount CDROM
mount_cd9660 (deb) mount /cdrom
diskutil mount /dev/disk1s0 ro /dev/dsk/c0t6d0s2 /cdrom
smitty cdrom
cdio eject
diskutil eject /dev/disk1s0
eject CDROM ? camcontrol eject devID eject eject cd0 eject cdrom eject CDROM
/Volumes/theCDmountpoint
eject /dev/rcd0c
mkhybrid -o image.iso dir
mkisofs mkisofs2;DEVICE=`lofiadm -
mkisofs vnconfig vnd0 image.iso a /absolute_pathname/image.iso` ; mount
create/mount ISO image mkcd hdiutil create/mount ISO image
mdconfig; mount mount -o loop pathToIso && mount -t -F hsfs -o ro
mountPoint cd9660 /dev/vnd0c $DEVICE
mountPoint
aclget
getfacl
aclput getfacl getfacl
ACL management setfacl fsaclctl ? ACL management
acledit setfacl setfacl
{get,set}{f,p}mac
ls -e
cfgadm
fcstat luxadm
Fibre Channel / SAN ? ? ? ? Fibre Channel / SAN
lscfg -vl fcs0 stmsboot
mpathadm
TASK \ OS AIX FreeBSD Linux Mac OS X OpenBSD Solaris OS / TASK
/etc/exports NetInfo: /exports /etc/dfs/dfstab
NFS share definitions /etc/exports /etc/exports /etc/exports NFS share definitions
/etc/xtab Netinfo: /config/SharePoints dfshares
kill -s HUP /etc/init.d/nfs-server reload kill -s HUP kill -HUP share
NFS share command exportfs -a NFS share command
`cat /var/run/mountd.pid` (rh) exportfs -a `cat /var/run/mountd.pid` `cat /var/run/mountd.pid` shareall
nfsstat showmount
NFS information nfsstat cat /proc/mounts nfsstat nfsstat NFS information
nfso -as nfsstat
/etc/host.conf (4-) /etc/nsswitch.conf /etc/nsswitch.conf
name resolution order /etc/netsvc.conf NetInfo /etc/resolv.conf name resolution order
/etc/nsswitch.conf (5+) /etc/resolv.conf getent
dladm
ifconfig -a
ndd
no -a
ifconfig ifconfig -a ifconfig -a
show network interface info netstat -i ifconfig -a ifconfig -A show network interface info
ethtool netstat -a netstat -in
netstat -v
dladm
lsattr -E -l entX
(8+) kstat -n hme0 | egrep 'ifspeed|duplex'
ifconfig
(rh) redhat-config-network
(fedora) system-config-
smitty chinet network
edit: /etc/{resolv.conf, hosts, hostname.*,
(rh) edit: /etc/hosts,
edit /etc/rc.conf (option netmasks, nodename,
/etc/sysconfig/network, System Preferences: ifconfig
chdev -a netaddr= ifconfig_interfacename) dumpadm.conf, inet/ipnodes, net/*/hosts}
change IP /etc/sysconfig/ Network change IP
newIP -I en#
network-scripts/ NetInfo edit /etc/hostname.driver
ifconfig sys-unconfig; reboot (this is overkill for a
ifcfg-eth0
mktcpip simple IP or hostname change)
(deb) edit
/etc/network/interfaces;
/etc/init.d/networking
restart
start DHCP client dhcpcd dhclient ? ifconfig interface dhcp start DHCP client
dhclient interface
dhcpcd (runtime)
http://bhami.com/rosetta.html 06/11/2008
Rosetta Stone for Unix Página 5 de 8
http://bhami.com/rosetta.html 06/11/2008
Rosetta Stone for Unix Página 6 de 8
sourceforge.net
www-1.ibm.com/servers/ rpmfind.net fink.sourceforge.net
aix/products/aixos/linux/ (deb) ftp.debian.org
ftp.freebsd.org/ ftp://ftp.openbsd.org/
precompiled binaries of download.html (deb) packages.debian.org darwinports.opendarwin www.sunfreeware.com precompiled binaries of
pub/FreeBSD pub/OpenBSD/<version>/
GPLware and freeware aixpdslib.seas.ucla.edu/ .org www.blastwave.org GPLware and freeware
www.freebsd.org (gen)packages.gentoo.org3 packages
aixpdslib.html
bullfreeware.com (gen)gentoo-portage.com3 darwinports.com
(md)easyurpmi.zarb.org
/usr/ibmcxx/bin/cc cc /opt/SUNWspro/
C compiler /usr/bin/cc (gcc) /usr/bin/cc (gcc) /usr/bin/cc C compiler
/usr/vac/bin/cc ($) gcc bin/cc2
sw_vers
Apple:About This Mac
(rh) rpm -q ls /Library/Receipts showrev -p
show patch level instfix -ivq (rh) cat /proc/version uname -a prodreg (2.6+) show patch level
uname -a sysctl -n kern.version
and/or patches oslevel -s (rh) cat /etc/redhat-release lsbom patchadd -p and/or patches
(deb) dpkg -s cat /System/Library/ cat /etc/release
CoreServices/
SystemVersion.plist
cvs
apt-get update
(6.2+) csup cvsup installpatch (2.5.1-)
apt-get upgrade System Preferences /
installp sup patchadd (2.6+)
patch tool (rh) up2date Software Update patch tool
smitty update_all cvsup or cvs to update, cvsync pkgadd; pkgrm
(rh) yum update softwareupdate
then rebuild patch /usr/sadm/bin/smpatch (9+)
(md) urpmi
pkg_add
configure/show crle configure/show
runtime linking ldd ldconfig ldd runtime linking
dump -H ldd
fortran-2000.com/ ldconfig ldd otool -L pldd fortran-2000.com/
ldd ldconfig
ArnaudRecipes/ kldstat lsmod modinfo ArnaudRecipes/
sharedlib.html LD_PRELOAD sharedlib.html
$LD_LIBRARY_PATH $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH
link library path $LIBPATH $LD_LIBRARY_PATH $LD_LIBRARY_PATH link library path
/etc/ld.so.conf man dyld (7+ deprecated in favor of crle)
trace
ktrace; kdump (<=10.4) ktrace truss
syscalls ktrace strace
tracing utility dtruss; dtrace (>=10.5) kdump sotruss tracing utility
truss truss ltrace
fs_usage systrace dtrace (10+)
watch
/etc/profile
/etc/security/ /etc/profile /etc/default/login
/etc/security/
define user defaults mkuser.default /etc/login.conf /usr/bin/defaults /etc/skel/* /etc/profile define user defaults
/etc/skel/
/etc/environment /etc/login.conf /etc/security/
/etc/profile.d/*
csh global .login /etc/csh.login /etc/csh.login /etc/csh.login /etc/csh.login /etc/csh.login /etc/.login csh global .login
/var/log/syslog
/var/adm/messages
/var/adm/syslog /var/log/messages
default syslog and messages /var/log/messages /var/log/system.log /var/log/messages /var/log/syslog default syslog and messages
/var/adm/messages /usr/adm/messages
softpanorama.org/Logs/solaris_logs.shtml
/var/log/maillog
dmesg
dmesg Console dmesg
system error reporting tool errpt prtdiag system error reporting tool
send-pr /var/log/crash.log, dmesg sendbug
(deb) reportbug
ftp://ftp.software.ibm.com/ vm_stat; nfsstat;
vmstat fstat; iostat;
aix/tools/perftools/perfpmr fs_usage; sc_usage; sar; iostat; kstat;
fstat; nfsstat; systat; vmstat; procinfo -D netstat; nfsstat; pstat;
performance monitoring top mpstat; netstat; nfsstat; performance monitoring
netstat; uustat; top; iostat top systat; top;
vmstat; iostat; sar; filemon; Activity Monitor (10.3+) prstat; trapstat; vmstat; ptree
htop vmstat;
topas; trace; svmon; netpmon Process Viewer (10.2-)
fuser
lsof lsof
match process to file or port procfiles (5.2+, files only) lsof fstat lsof2 match process to file or port
sockstat netstat -atup pfiles
http://bhami.com/rosetta.html 06/11/2008
Rosetta Stone for Unix Página 7 de 8
www.redbooks.ibm.com www.openbsd.org/
developer.apple.com/ docum.html
www.ibm.com/
tldp.org darwin
developerworks/aix
vendor docs and patches (see www.freebsd.org/handbook www.info.apple.com/ docs.sun.com vendor docs and patches (see
techsupport.services. www.openbsd.org/
also man pages) www.freebsd.org/releases/ www.linuxdoc.org/ support/downloads.html sunsolve.sun.com also man pages)
ibm.com/ errata.html
rpmfind.net/linux/RPM www.apple.com/support/
server/support?
security/security.html
view=pSeries www.openbsd.org/
security.html
800-426-7378 925-674-0783
vendor phone (US) ? 1-800-MY-APPLE ? 800-USA-4SUN vendor phone (US)
(800-IBM-SERV) (FreeBSD Mall)
http://bhami.com/rosetta.html 06/11/2008
Rosetta Stone for Unix Página 8 de 8
Footnotes
1. In System V-based Unixes, run level relates to booting, shutdown, and single-user mode. In BSD, it has to do with security.
2. Freeware or separately downloadable; not part of the base OS. See the precompiled binaries task or web search.
3. Gentoo does not have precompiled packages. It compiles them on your computer. It also has some "overlays" for packages that are not (yet) in the main portage tree. See http://overlays.gentoo.org/
Universal Command Guide is a large book which covers several of the OSs in this table. See www.allcommands.com
UnixGuide.net has a similar table covering fewer Unix versions and a somewhat different set of tasks. See unixguide.net/cgi-bin/unixguide.cgi
Colin Barschel's Unix Toolbox cb.vu/unixtoolbox.xhtml is a wonderfully detailed handbook sorted by task area and giving both commands and config file excerpts for Linux and BSD.
Solaris / HP-UX: soldc.sun.com/migration/hpux/migissues/. If that page no longer exists, get an archived version from the Internet Archive Wayback Machine at www.archive.org/web/web.php
Ben Zorn's Debugging Tools for Dynamic Storage Allocation and Memory Management: www.cs.colorado.edu/homes/zorn/public_html/MallocDebug.html
en.wikipedia.org/wiki/Comparison_of_operating_systems
en.wikipedia.org/wiki/Comparison_of_Linux_distributions
USENIX: www.usenix.org/
This page is http://bhami.com/rosetta.html last updated 2008.10.26. This compilation Copyright © 2000-2009 Bruce Hamilton bhami@pobox.com. Reproduce freely for personal use. Do not reproduce for commercial purposes. LINK don't copy, or you will miss
updates! Original concept by Pat Wilson. Thanks to Bitt Faulk and Mårten Svantesson for the improved JavaScript.
http://bhami.com/rosetta.html 06/11/2008