0% found this document useful (0 votes)
2K views

Linux Vs Solaris Commands PDF

This document provides information on directory mappings and commands for system administration tasks on both Linux and Solaris systems. It lists the default locations for important directories like /root, /home, and directories for user accounts, passwords and groups. It also summarizes commands for managing users, printers, networking, filesystems, logical volumes, software installation and more. Examples are given for both Linux/RedHat and Solaris.

Uploaded by

rsreddy.ch5919
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Linux Vs Solaris Commands PDF

This document provides information on directory mappings and commands for system administration tasks on both Linux and Solaris systems. It lists the default locations for important directories like /root, /home, and directories for user accounts, passwords and groups. It also summarizes commands for managing users, printers, networking, filesystems, logical volumes, software installation and more. Examples are given for both Linux/RedHat and Solaris.

Uploaded by

rsreddy.ch5919
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Directory Mappings

Root filesystem

Linux (Red Hat)


/ {/dev/sda1}

SOLARIS
/ {/dev/vx/dsk/rootvol} /export/home /dev/vx/dsk/home} /tmp /dev/vx/dsk/swapvol} /usr /var

Home Directory

User Accounts
Password files Groups file aximum ! of user "D *llow/De+y remote logi+ 3ser +o4ody5s id ! Group +o4ody5s id ! Recover root password

LINUX(RedHat)
/etc/passwd /etc/shadow /etc/group #$$%$ /etc/securetty {ttyp1} 66 66 li+ux / vi /etc/shadow

Solaris
/etc/passwd /etc/shadow /etc/group &1'(')%#'( /etc/default/logi+ {,-./-012/dev/co+sole} #7771 8 #$$%'9+o4ody': #777& 8 #$$%'9+ogroup: 4oot cdrom ;s mkdir /tmp/a mou+t /dev/c7t7d7s7 /tmp/a vi /tmp/a/etc/shadow useradd userdel logi+s usermod

,reate +ew user Delete user 0ist users odify user accou+t

useradd userdel usermod

General o!!ands
3+i<ue host "D *dmi+istrator Performa+ce mo+itor /ystem activity reporter =irtual emory statistics "/- statistics 1rror logs Physical R* /hared emory Process Data /pace /wap device /wap file type Display swap siBe *ctivate /wap

LINUX(RedHat)
hostid li+uxco+f top vmstat dmesg #' G> {?&@%@&'} sysctl ker+el@shmmax 677 > /dev/sda& partitio+ type )& free swapo+ ;a hostid admi+tool top sar vmstat iostat dmesg 1#A>

Solaris

/dev/vx/dsk/swapvol swap swap ;l swap ;a

"rinters
Pri+ter Cueues /top 0P /tart 0P /u4mit pri+t Eo4s 0P statistics Remove pri+t Eo4s *dd pri+ter <ueue Remove Pri+ter <ueue ake default pri+ter

LINUX
/var/spool/lpd/lp/D /etc/i+it@d/lpd stop /etc/i+it@d/lpd start lpr lp< lprm pri+ttool

Solaris
/etc/lp/i+terfaces/D /usr/li4/lp/lpshut /usr/li4/lp/lpsched lp lpr lpstat ca+cel lprm lpadmi+ ;p p< lpadmi+ ;x p< lpadmi+ ;d p<

# "$I"
.etwork "P co+figuratio+

LINUX(RedHat)

Solaris
/etc/host+ame@D /etc/i+et/D /etc/defaultrouter /etc/i+et/hosts /etc/+sswitch@co+f +dd /dev/GtcpFipH I i+@routed ifco+fig ;a ifco+fig hme7K1 "P up >*..1R L /etc/default/tel+etd {/etc/system} set ptJc+t 2 ! {/N/=} set +pty 2 ! {>/D} {/etc/iu@ap} ptsl 7 ! ldterm ttcompat halt 4oot ;r 1(# {>/D} &$# %777 {/N/=} rsh /usr/li4/+etsvc/yp/yp4i+d

Hosts "P addresses .ame service switch .etwork parameters Routi+g daemo+ .", ,o+figuratio+s /eco+dary "P *ddress 0ogi+ prompt

/etc/sysco+fig/+etwork;scripts/ /etc/hosts /etc/+sswitch@co+f sysctl ;a F grep +et routed ifco+fig ;a modpro4e ipJalias ifco+fig eth7K1 "P /etc/issue

"+crease the ! of pseudo;termi+als

cd /dev @/ *M1D1= ;v pty

aximum ! of ptys Remote /hell NP/."/ service 4i+der rsh /s4i+/yp4i+d

Syste! %iles
.O/ exported .O/ ,lie+t mou+ted directories

LINUX(RedHat)
/etc/exports /var/li4/+fs/xta4

Solaris
/etc/dfs/dfsta4 /etc/dfs/shareta4 /etc/rmta4

ax Oile /ystem & A> ax Oile /iBe ax ! Oile Descriptors & G> {$1&> 4lock siBe} )16& G> {)M> 4lock siBe} sysctl fs@file;max

1 A> )777 A> {vxfs} 1 A> & G> {2P&@$@1} #' M

DIS&$L'M o!!ands
Oilesystem ta4le Oree disk 4locks Device listi+g Disk i+formatio+

LINUX(RedHat)
/etc/fsta4 df ;k cat /proc/devices

SOLARIS
/etc/vfsta4 df ;k sysdef format ;d c!t!d! format?curre+t format?i+<uiry prtvtoc su4 disk =olume Plex disk group vxfs /dev/vx/dsk/rootdg vxpri+t ;l ;g rootdg vxdiskadd vxpri+t ;dl vxdg rmdisk vxassist move vxdg i+it

Disk 0a4el 0= ,o+cepts

cat /proc/scsi/scsi7/sda/model fdisk ;l logical exte+ts logical volume volume group ext& vgdisplay ;v pvcha+ge pvcreate pvdisplay vgreduce pvmove vgcreate vgremove vgcha+ge vgcfgrestore vgexport vgimport vgsca+ lvcha+ge lvdisplay lvcreate lvexte+d lvreduce lvremove lilo resiBe&fs lvsplit lvmerge

Qour+al Oilesystem type Default volume group Display volume group odify physical volume Prepare physical disk 0ist physical volume Remove disk from volume group ove logical volumes to a+other physical volumes ,reate volume group Remove volume group =olume group availa4ility Restore volume group 1xports volume group "mports volume group =olume group listi+g ,ha+ge logical volume characteristics 0ist logical volume ake logical volume 1xte+d logical volume Reduce logical volume Remove logical volume Prepare 4oot volumes 1xte+d Oile system Reduce//plit mirrors erge mirrors

vxdg deport vxdg import vxedit set vxpri+t ;vl vxassist make vxassist growto vxassist shri+kto vxedit rm vx4ootsetup vxva mkfs ;

,reate mirrors *dd mirrors ,reate striped volumes >ackup Restore lvcreate ;i % ;" #' tar cvf /dev/rst7 / tar xvf /dev/rst7

vxassist mirror vxassist make vol 177m4 layout2raid$ ufsdump ufsrestore

MIS
/tartup script Mer+el Mer+el Parameters Reco+figure the ker+el

LINUX(RedHat)
/etc/rc@d/rc /4oot/vmli+uB sysctl ;a cd /usr/src/li+ux

SOLARIS
/s4i+/i+it@d /ker+el/ge+u+ix sysdef ;i vi /etc/system re4oot

make mrproper make me+uco+fig make dep make clea+ make 4Bimage make i+stall make modules make modulesJi+stall

cp arch/i%)#/4oot/4B"mage /4oot/vmli+uB;&@&@1# mki+itrd /4oot/i+itrd; &@&@1#@img &@&@1# vi /etc/lilo@co+f lilo


0ist modules 0oad module 3+load module "+itialiBe system Physical R* Mer+el >its ,rash utility Arace /ystem ,alls achi+e model -/ 0evel Ru+ 0evel ,ore dump files >oot si+gle user ai+te+a+ce mode lsmod i+smod rmmod +etco+f free getco+f R-RDJ>"A lcrash strace u+ame ;m u+ame ;r ru+level li+ux / modi+fo modload modu+load sys;u+co+fig prtco+f isai+fo ;kv crash truss u+ame ;imp u+ame ;r who ;r /var/crash/Su+ame ;+S ok 4oot ;s ok 4oot ;as

"+terrupt Mey Retur+ to co+sole AimeBo+e a+ageme+t .AP Daemo+

/top;* ok go /etc/sysco+fig/clock /etc/+tp@co+f /etc/rc@d/i+it@d/x+tpd /etc/A" 1T-.1 /etc/default/i+it /etc/i+et/+tp@co+f /etc/i+it@d/x+tpd

So(t)are
"+stall /oftware 3+i+stall software 0ist i+stalled software =erify i+stalled software 0ist all files 0ist i+stalled patches Package ow+er /R Directory

LINUX(RedHat)
rpm ;i package rpm ;e package rpm ;<a rpm ;= package rpm ;<l package rpm ;<f file /var/li4/rpm pkgadd pkgrm pkgi+fo

SOLARIS

pkgi+fo ;i pkgi+fo ;p pkgchk ;l package patchadd ;p pkgchk ;l ;p path /var/sadm

De*ices
Devices "+stall devices for attached peripherals /dev

LINUX(RedHat)
/devices

SOLARIS
drvco+fig devli+ks disks tapes ports remJdrv prtco+f ;D psri+fo ;v pmadm ;l /usr/platform/Su+ame ;mS/ s4i+/prtdiag ok test;all /opt//3.Rvts/4i+/su+vts /dev/c!t!d7s& /dev/dsk/c!t#d7s& hsfs /dev/rmt/7 /dev/rmt/7+ /dev/diskette

/dev/ *M1D1= Remove device Device drivers ,P3 0ist Aermi+al Diag+ostics

cat /proc/cpui+fo

Rhole Disk ,DR,DR- file type Rewi+di+g tape drive .o+;rewi+di+g tape drive Oloppy drive

/dev/sda /dev/cdrom iso6##7 /dev/rst7 /dev/+rst7 /dev/fd7

{ c 6 7} { c 6 1&) }

You might also like