(ebook - Doc) Linux Vs. Solaris Commands

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View (ebook - Doc) Linux Vs. Solaris Commands as PDF for free.

More details

  • Words: 866
  • Pages: 5
Directory Mappings

Linux (Red Hat)

SOLARIS

Root filesystem /

{/dev/sda1}

Home Directory

User Accounts Password files Groups file Maximum # of user ID Allow/Deny remote login User nobody's id # Group nobody's id # Recover root password

Create new user Delete user List users Modify user account

General Commands Unique host ID Administrator Performance monitor System activity reporter Virtual Memory statistics I/O statistics Error logs Physical RAM Shared Memory Process Data Space Swap device Swap file type Display swap size Activate Swap

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

LINUX(RedHat)

Solaris

/etc/passwd /etc/shadow /etc/group 65535

/etc/passwd /etc/shadow /etc/group 2147483647

/etc/securetty {ttyp1} 99 99

/etc/default/login {CONSOLE=/dev/console} 60001 & 65534(nobody4) 60002 & 65534(nogroup)

linux S vi /etc/shadow

boot cdrom -s mkdir /tmp/a

useradd userdel

mount /dev/c0t0d0s0 /tmp/a vi /tmp/a/etc/shadow useradd userdel logins usermod

usermod

LINUX(RedHat) hostid linuxconf top vmstat dmesg 64 GB {>2.3.24} sysctl kernel.shmmax 900 MB /dev/sda2 partition type 82 free swapon -a

Solaris hostid admintool top sar vmstat iostat dmesg 16TB

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

Printers Printer Queues Stop LP Start LP Submit print jobs LP statistics Remove print jobs Add printer queue Remove Printer queue Make default printer

TCP/IP

LINUX

Solaris

/var/spool/lpd/lp/* /etc/init.d/lpd stop /etc/init.d/lpd start

/etc/lp/interfaces/* /usr/lib/lp/lpshut /usr/lib/lp/lpsched

lpr lpq

lp lpr lpstat cancel lprm lpadmin -p pq lpadmin -x pq lpadmin -d pq

lprm printtool

LINUX(RedHat)

Solaris

Network IP configuration

Hosts IP addresses Name service switch Network parameters Routing daemon NIC Configurations Secondary IP Address

/etc/sysconfig/network-scripts/ /etc/hosts /etc/nsswitch.conf sysctl -a | grep net routed ifconfig -a

/etc/hostname.* /etc/inet/* /etc/defaultrouter /etc/inet/hosts /etc/nsswitch.conf ndd /dev/[tcp|ip] ? in.routed ifconfig -a

modprobe ip_alias ifconfig eth0:1 IP

ifconfig hme0:1 IP up

Login prompt /etc/issue Increase the # of pseudo-terminals

cd /dev ./MAKEDEV -v pty

BANNER @ /etc/default/telnetd {/etc/system} set pt_cnt = # {SYSV} set npty = # {BSD} {/etc/iu.ap} ptsl 0 # ldterm ttcompat

Maximum # of ptys Remote Shell YP/NIS service binder

System Files

rsh /sbin/ypbind

LINUX(RedHat)

NFS exported NFS Client mounted directories

/etc/exports /var/lib/nfs/xtab

halt boot -r 176 {BSD} 256 3000 {SYSV} rsh /usr/lib/netsvc/yp/ypbind

Solaris /etc/dfs/dfstab /etc/dfs/sharetab /etc/rmtab

Max File System 2 TB Max File Size Max # File Descriptors

DISK/LVM Commands Filesystem table Free disk blocks Device listing Disk information

Disk Label LVM Concepts

Journal Filesystem type Default volume group Display volume group Modify physical volume Prepare physical disk List physical volume Remove disk from volume group Move logical volumes to another physical volumes Create volume group Remove volume group Volume group availability Restore volume group Exports volume group Imports volume group Volume group listing Change logical volume characteristics List logical volume Make logical volume Extend logical volume Reduce logical volume Remove logical volume Prepare boot volumes Extend File system Reduce/Split mirrors Merge mirrors

2 GB {512B block size} 8192 GB {8KB block size} sysctl fs.file-max

1 TB 8000 TB {vxfs} 1 TB 2 GB {=<2.5.1} 64 K

LINUX(RedHat) /etc/fstab df -k cat /proc/devices

cat /proc/scsi/scsi0/sda/model fdisk -l logical extents logical volume volume group ext2 vgdisplay -v pvchange pvcreate pvdisplay vgreduce pvmove vgcreate vgremove vgchange vgcfgrestore vgexport vgimport vgscan lvchange lvdisplay lvcreate lvextend lvreduce lvremove lilo resize2fs lvsplit lvmerge

SOLARIS /etc/vfstab df -k sysdef format -d c#t#d# format>current format>inquiry prtvtoc sub disk Volume Plex disk group vxfs /dev/vx/dsk/rootdg vxprint -l -g rootdg vxdiskadd vxprint -dl vxdg rmdisk vxassist move vxdg init

vxdg deport vxdg import vxedit set vxprint -vl vxassist make vxassist growto vxassist shrinkto vxedit rm vxbootsetup vxva mkfs -M

Create mirrors

vxassist mirror

Add mirrors Create striped volumes Backup Restore

MISC Startup script Kernel Kernel Parameters Reconfigure the kernel

lvcreate -i 3 -I 64 tar cvf /dev/rst0 / tar xvf /dev/rst0

vxassist make vol 100mb layout=raid5 ufsdump ufsrestore

LINUX(RedHat)

SOLARIS

/etc/rc.d/rc /boot/vmlinuz sysctl -a

/sbin/init.d /kernel/genunix sysdef -i

cd /usr/src/linux

vi /etc/system

make mrproper make menuconfig make dep make clean make bzimage make install make modules make modules_install

reboot

cp arch/i386/boot/bzImage /boot/vmlinuz-2.2.16 mkinitrd /boot/initrd2.2.16.img 2.2.16 vi /etc/lilo.conf lilo List modules Load module Unload module Initialize system Physical RAM Kernel Bits Crash utility Trace System Calls Machine model OS Level Run Level Core dump files Boot single user Maintenance mode

lsmod insmod rmmod netconf free getconf WORD_BIT lcrash strace uname -m uname -r runlevel linux S

modinfo modload modunload sys-unconfig prtconf isainfo -kv crash truss uname -imp uname -r who -r /var/crash/`uname -n` ok boot -s ok boot -as

Interrupt Key Return to console Timezone Management NTP Daemon

Stop-A ok go /etc/sysconfig/clock /etc/ntp.conf /etc/rc.d/init.d/xntpd

Software

LINUX(RedHat)

Install Software Uninstall software List installed software Verify installed software

rpm -i package rpm -e package rpm -qa rpm -V package

List all files List installed patches Package owner SW Directory

rpm -ql package

SOLARIS pkgadd pkgrm pkginfo pkginfo -i pkginfo -p pkgchk -l package patchadd -p pkgchk -l -p path /var/sadm

rpm -qf file /var/lib/rpm

Devices Devices Install devices for attached peripherals

/etc/TIMEZONE /etc/default/init /etc/inet/ntp.conf /etc/init.d/xntpd

LINUX(RedHat)

SOLARIS

/dev

/devices

/dev/MAKEDEV

drvconfig devlinks disks tapes ports rem_drv prtconf -D psrinfo -v pmadm -l

Remove device Device drivers CPU List Terminal Diagnostics

cat /proc/cpuinfo

Whole Disk CDROM CDROM file type Rewinding tape drive Non-rewinding tape drive Floppy drive

/dev/sda /dev/cdrom iso9660 /dev/rst0 /dev/nrst0 /dev/fd0

{ c 9 0} { c 9 128 }

/usr/platform/`uname -m`/ sbin/prtdiag ok test-all /opt/SUNWvts/bin/sunvts /dev/c#t#d0s2 /dev/dsk/c#t6d0s2 hsfs /dev/rmt/0 /dev/rmt/0n /dev/diskette

Related Documents

Solaris Commands
April 2020 8
Linux Commands
August 2019 49
Linux Commands
June 2020 31
Linux Commands
June 2020 15
Linux Commands
June 2020 24