Cross Index of Linux and Solaris Administration Commands

This is a collection of commands that I used on various systems. I do not guarantee their accuracy.

Very useful reference: http://www.redbooks.ibm.com/redbooks/pdfs/sg247186.pdf.

Cross Reference of Linux and Solaris Administration Commands

CategoryTaskRHEL / CentOS / FedoraSUSEUbuntu / DebianSolarisNotes
Disk PartitionsCreatefdisk, parted, gpartedfdisk, parted, gpartedfdisk, parted, gpartedformat, fmthard
Disk PartitionsDisplayfdisk, parted, gpartedfdisk, parted, gpartedfdisk, parted, gpartedprtvtocmax partitions on solaris is 7
Disk PartitionsMaximumSCSI=15, IDE=63SCSI=15, IDE=63SCSI=15, IDE=637
File SystemCreatemkfs, mkfs.ext3, parted, gpartedmkfs, mkfs.ext3, mkfs.reserfs, parted, gpartedmkfs, mkfs.ext3, parted, gpartedmkfs, newfs
File SystemCheckfsckfsckfsck, badblocksfsck
Swap Create swap spacemkswapmkswapmkswapswap -a
Swap Enable swap spaceswaponswaponswaponswap -a
Swap Display swap space usageswapon -sswapon -sswapon -sswap -s
Swap Display swap space statusswap -lswap -lswap -lN/A
Swap Disable swap spaceswapoffswapoffswapoffN/Aswapoff -a (all swap spaces)
Swap Delete swap spacermrmrmswap -d
Swap Set swap priority levelswapon -pswapon -pswapon -pN/A
LVMInitialize a diskpvcreate, mkraid, mdadmpvcreate, mkraid, mdadmpvcreate, mkraid, mdadmmetainit
LVMCreate volume or volume grouplvcreate LVname
vgcreate VGname devicename
mkraid, mdadm
lvcreate LVname
vgcreate VGname devicename
mkraid, mdadm
lvcreate LVname
vgcreate VGname devicename
mkraid, mdadm
metainit volname raidtype devices ...
LVMEnable volume or volume grouplvchange -a y LVname
vgchange -a y VGname
raidstart
lvchange -a y LVname
vgchange -a y VGname
raidstart
lvchange -a y LVname
vgchange -a y VGname
raidstart
N/A
LVMDisable volume or volume grouplvchange -a n LVname
vgchange -a n VGname
raidstop, mdadm
lvchange -a n LVname
vgchange -a n VGname
raidstop, mdadm
lvchange -a n LVname
vgchange -a n VGname
raidstop, mdadm
N/A
LVMDelete volume or volume grouplvremove LVname
vgremove VGname
lvremove LVname
vgremove VGname
lvremove LVname
vgremove VGname
metaclear
LVMAdd a device to volume or volume grouplvextend LVname
vgextend VGname newdevname
lvextend LVname
vgextend VGname newdevname
lvextend LVname
vgextend VGname newdevname
metattach or metainit
LVMDelete a device from the volume
or volume group
lvreduce LVname
vgreduce VGname devicename
raidreconf
lvreduce LVname
vgreduce VGname devicename
raidreconf
lvreduce LVname
vgreduce VGname devicename
raidreconf
metadetach
AutoFS Daemonautomountautomountautomountautomountdnot a command but useful
AutoFS Master cfg file/etc/auto.master/etc/auto.master/etc/auto.master/etc/auto_masternot a command but useful
AutoFS Other cfg file/etc/auto.misc/etc/auto.misc/etc/auto.misc/etc/auto_homenot a command but useful
File SystemCD-ROMiso9660iso9660iso9660hsfsnot a command but useful
File SystemDVDudfudfudfudfnot a command but useful
File SystemWindowsvfatvfatvfatpcfsnot a command but useful
File SystemLinux/unixext2, ext3, ext4, xfsext2, ext3, ext4, xfsext2, ext3, ext4, xfs, reiserfsufs
LVMCreate a soft partition or logical
volume (no RAID)
lvcreate -Lsize -nLVname
VGname
lvcreate -Lsize -nLVname
VGname
lvcreate -Lsize -nLVname
VGname
metainit -p
LVMCreate a soft partition or logical
volume (RAID 0)
lvcreate -iNumOfStripes
-IStripeSize -nLVname VGname
mdadm, mkraid
lvcreate -iNumOfStripes
-IStripeSize -nLVname VGname
mdadm, mkraid
lvcreate -iNumOfStripes
-IStripeSize -nLVname VGname
mdadm, mkraid
metainit with RAID 0 on devices
first, then metainit -p to create
the soft partition volume
LVMCreate a soft partition or logical
volume on a specific device
lvcreate -iNumOfStripes
-IStripeSize -nLVname VGname
mdadm, mkraid
+ devicename
lvcreate -iNumOfStripes
-IStripeSize -nLVname VGname
mdadm, mkraid
+ devicename
lvcreate -iNumOfStripes
-IStripeSize -nLVname VGname
mdadm, mkraid
+ devicename
metainit with RAID 0 on devices
first, then metainit -p to create
the soft partition volume
+ devicename
LVMDelete a soft partition or logical
volume
lvremove /dev/VGname/LVname
raidreconf
lvremove /dev/VGname/LVname
raidreconf
lvremove /dev/VGname/LVname
raidreconf
metaclear
LVMExtend a volume or logical
volume
lvextend -Lsize
/dev/VGname/LVname
raidreconf
lvextend -Lsize
/dev/VGname/LVname
raidreconf
lvextend -Lsize
/dev/VGname/LVname
raidreconf
metattach volume
LVMExtend a file system after volume
has been grown
resize2fs, resize_reiserfsresize2fs, resize_reiserfsresize2fs
growfs
LVMReduce a volume or logical
volume
resize2fs,
lvreduce
resize2fs,
lvreduce
resize2fs,
lvreduce
metadetach Volname devicename
LVMSet up or display metadbvgdisplay, lvdisplay, lsraidvgdisplay, lvdisplay, lsraidvgdisplay, lvdisplay, lsraidmetadb
LVMDisplay metadevice statusvgdisplay, lvdisplay
cat /proc/mdstat
vgdisplay, lvdisplay
cat /proc/mdstat
vgdisplay, lvdisplay
cat /proc/mdstat
metastat
LVMInitialize raw devices to
metadevices
pvcreatepvcreatepvcreatemetainit
LVMAttach metadevicesvgchange, lvchangevgchange, lvchangevgchange, lvchangemetattach
LVMDetach metadevicesvgchange, lvchangevgchange, lvchangevgchange, lvchangemetadetach
LVMClear and remove metadevicesvgremove, lvremovevgremove, lvremovevgremove, lvremovemetaclear
LVMReplace a metadeviceraidreconfraidreconfraidreconfmetareplace
LVMRename a volumeraidreconfraidreconfraidreconfmetarename
LVMCheck metadevice ID
configuration
mdadmmdadmmdadmmetadevadm
LVMManage hot sparesmdadm, raidhotadd,
raidhotremove
mdadm, raidhotadd,
raidhotremove
mdadm, raidhotadd,
raidhotremove
metahs
LVMSet submirrors offlinemdadmmdadmmdadmmetaoffline
LVMSet submirrors onlinemdadmmdadmmdadmmetaonline
LVMChange volume parametersvgchange, lvchangevgchange, lvchangevgchange, lvchangemetaparam
LVMBack up volume group metadatavgcfgbackupvgcfgbackupvgcfgbackupN/A
LVMRecover soft partition
configuration information
vgcfgrestorevgcfgrestorevgcfgrestoremetarecover
LVMSet up root file system for
mirroring
N/AN/AN/Ametaroot
LVMAdminister disk sets for sharingN/AN/AN/Ametaset
LVMResynchronize volume during
reboot
N/AN/AN/Ametasync
LVMExpand a file system sizevgextend, lvextend, resize2fs,
resize_reiserfs, raidreconf
vgextend, lvextend, resize2fs,
resize_reiserfs, raidreconf
vgextend, lvextend, resize2fs,
resize_reiserfs, raidreconf
growfs
LVMHas entries that starts up the
kernel metadevice modules
N/AN/AN/A/etc/systemnot a command, file
LVMSets the default number of
available volumes
/etc/sysconfig/lvm
/etc/raidtab
??/kernel/drv/md.conf
LVMScan for devices visible to LVM2lvmdiskscanlvmdiskscanlvmdiskscanN/A
LVMScan disks for logical volumeslvscanN/A
LVMDisplay physical volume attributespvdisplaypvdisplaypvdisplayN/A
LVMReport physical volume informationpvspvspvsN/A
LVMScan all supported logical volume block devices for
physical disk
pvscanpvscanpvscanN/A
LVMPerform consistency check on the volume groupvgckvgckvgckN/A
LVMScan all disks for volume group data and rebuild cachesvgscanvgscanvgscanN/A
LVMImport a volume group to this servervgimportvgimportvgimportN/A
LVMExport a volume group out of this servervgexportvgexportvgexportN/A
Pkg Install packagesrpm -i
yum install
?apt-get installpkg install
Pkg Display installed packagesrpm -qa
yum list installed
?dpkg -lpkginfo or pkparam
Pkg Remove software packagerpm -e
yum remove
?apt-get removepkgrm
Pkg Upgrade/install packagerpm -U
yum upgrade/update
?apt-get upgrade/updatepkg update
Pkg Verify correct installationrpm -V
yum-verify
?apt-get check or debsumspkgchk
Pkg List the contents of an installed packagerpm -ql package-name?apt-file list package-nameLook in /var/sadm/install/contents rpm -
Pkg Which package contains a filerpm -qf filename?apt-file search filenameLook in /var/sadm/install/contents
Pkg List all available packagesyum list?dpkg -l \*pkg list -nIt is odd that you cannot do this with rpm.
Pkg Report package informationrpm -qi
yum info package-name
?apt-cache showpkg package-nameLook in /var/sadm/pkg/PKGNAME/pkginfo
PatchInstall a patchrpm -F
yum update
?apt-get updatepatchaddPackage mgmt in linux is different.
PatchRemove a patchN/AN/AN/ApatchrmPackage mgmt in linux is different.
PatchDisplay installed patchesN/AN/AN/Ashowrev -pPackage mgmt in linux is different.
KModInstall moduleinsmodinsmodinsmodmodload
KModList moduleslsmodlsmodlsmodmodinfo
KModRemove modulermmodrmmodrmmodmodunload
NetworkConfigure TCP/IP/etc/sysconfig/network and
/etc/sysconfig/networking/*
/etc/network/interfaces
/etc/NetworkManager
/etc/hostname.*
/etc/inet/*
/etc/defaultrouter
/etc/defaultdomain
/etc/nodename
 /etc/netmasks
NetworkDisplay interface settingsifconfig
ip
ifconfig
ip
ifconfig
ip
ifconfig -a
NetworkDisplay interface status and statisticsnetstat -inetstat -inetstat -inetstat -i
NetworkConfigure interfaceifconfig
ip
ifconfig
ip
ifconfig
ip
ifconfig
NetworkDisplay network statisticsnetstatnetstatnetstatnetstat
NetworkChange resolver/etc/resolv.conf/etc/resolv.conf/etc/resolv.conf/etc/resolv.conf
NetworkChange name services/etc/nsswitch.conf/etc/nsswitch.conf/etc/nsswitch.conf/etc/nsswitch.conf
NetworkDisplay kernel network paramssysctl -a | grep ^netsysctl -a | grep ^netsysctl -a | grep ^netndd /dev/ip \?
ndd /dev/tcp \?
NetworkConfigure kernel network paramssysctl -w variable=valuesysctl -w variable=valuesysctl -w variable=valuendd
NetworkCheck for network linkethtool
mii-tool
ethtool
mii-tool
ethtool
mii-tool
ndd
NetworkRename interfaceipipipN/A
NetworkCheck routing tablenetstat -r
route
netstat -r
route
netstat -r
route
netstat -r
NetworkPingpingpingpingping
NetworkTrace routertraceroute
zenmap
traceroute
zenmap
traceroute
zenmap
traceroute
NetworkCheck portsnmap
zenmap
nmap
zenmap
nmap
zenmap
nmap
NetworkCapture packetstcpdump
tethereal
ethereal
wireshark
tcpdump
tethereal
ethereal
wireshark
tcpdump
tethereal
ethereal
wireshark
snoop
wireshark
NFSManually start NFS server/etc/init.d/nfs start
/etc/init.d/nfsserver
service nfs start
/etc/init.d/nfs-kernel-server start
??/etc/init.d/nfs.server
start
NFSMount clinetmount server://resource
/mnt/point
??mount -F nfs
server://resource
/mnt/point
NFSServer config file/etc/sysconfig/nfs
/etc/default/nfs-kernel-server
/etc/default/nfs-common
?/etc/default/nfs /
NFSShare all exported file systemsexportfs -aexportfs -aexportfs -ashareall
NFSShare one exported file systemexportfs -oexportfs -oexportfs -osharefor new file systems
NFSConfig file/etc/exports/etc/exports/etc/exports/etc/dfs/dfstab
Device CreationCreate device filesudevudevudevdevfsadm

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.