Tuesday, September 6, 2016

AIX to Linux Quick sheet


I know its been done more than a million times now, and you can probably Google the information till the end of time but sometimes you need to recall the command for something you wrote 5 years ago.  So I found this nice table of AIX to Linux commands and system files, so as its useful I would like to keep it to hand and this seemed like the best place for it.  Some of these I use everyday so are rather obvious, but as I'm switching between AIX/Linux is easy to get mixed up.  First is AIX to SUSE, but I'll add in the Redhat ones soon, most are the same so should work on both (LVM specific for example). Feel free to ping me any corrections or examples of your own:
Common System Files
FileAIXLinux
Password file/etc/passwd/etc/passwd
Encrypted password file/etc/security/passwd/etc/shadow
Error logs
/var/adm/ras/errpt
/var/adm/messages
/var/log/messages
Group files
/etc/group
/etc/security/group
/etc/group
/etc/gshadow
Secure login
/etc/security/user
etc/securetty
DNS/etc/resolv.conf
/etc/netsvc.conf
/etc/resolv.conf
/etc/nsswitch.conf
Hosts file/etc/hosts/etc/hosts
Services/etc/services/etc/services
Kernel/usr/lib/boot/unix_64/boot/vmlinuz
Device filesODM at /etc/objrepos/dev
Inittab/etc/inittab/etc/inittab
inetd.conf/etc/inetd.conf/etc/inetd.conf
File systems/etc/filesystems/etc/fstab
Networking
ODM database at
/etc/objrepos
/etc/sysconfig/network (SUSE)
/etc/sysconfig/network (Redhat)
/etc/sysconfig/network-scripts/if* (Redhat)
NFS exports
/etc/exports/etc/exports
System environment
/etc/environment
/etc/profile
/etc/bash.bashrc
Common User-related
/etc/security/user/etc/default/useradd
New user profile/etc/.profile/etc/skel/*.*

Specific Commands
ActionAIXLinux
Listing physical volumes (PV)lspvpvdisplay
List partitions in a disklspv -l <disk>fdisk -l <disk>
List volume groups (VG)lsvgvgdisplay
Create volume groupmkvgvgcreate
Remove volume grouprmvgvgremove
Add a PV to VGextendvgvgextend
Remove a VG definitionexportvgvgexport
Remove a PV from VGreducevgvgreduce
Import VGimportvgvgimport
Activate VGvaryonvgvgchange
List logical volume (LV)lslvlvdisplay
Create LVmklvlvcreate
Grow filesystems with LVchfsresize_reiserfs and resize2fs
Shrink filesystemchfsresize_reiserfs and resize2fs
Paging/Swaplsps -aprocinfo
cat /proc/swaps
OS leveloslevel
uname -a
cat /etc/SuSE-release
cat /etc/redhat-release
Run levelwho -rrunlevel
Uptimeuptimeuptime
Performancevmstat, ps, sar, topas, and nmonvmstat, ps, sar, top,  and nmon (if installed)
List installed filesetslslpp -l rpm -qa
Which fileset a file is inwhich_fileset <name>rpm -qf <path/name>
Verify installed filesetslppchk -vrpm -V <package>
List files in a fileset/packagelslpp -f <fileset>rpm -ql <package>
List running kernel modulesgenkexlsmod
Insert moduleN/A (dynamic)insmod and modprobe
Unload modulesN/A (dynamic)rmmod and modprobe
List memory installedbootinfo -rfree, procinfo, and cat /proc/meminfo
Create usersmksueruseradd
Change user details chuserusermod and chage
Delete usersrmuseruserdel
Create groupsmkgrpgroupadd
Change group detailschgrpgroupmod
Delete grouprmgrpgroupdel
Install softwareinstallp, smitty install, rpm, and geninstallrpm -iv, yast -i, yast2 and yum install
Update softwaresmitty update_all, installp, and rpmrpm -Uv, yast2 and yum
Remove softwaresmit install, and rpmrpm -e, yast2 and yum
IP configurationsmitty tcpipyast2 network (SUSE) /etc/network/sysconfig/network-scripts (Redhat)
IP aliasifconfig en# alias <IP>ifconfig eth#:1<IP>
Network interfacesnetstat -inifconfig 
Network routesnetstat -rnnetstat -rn, route
staticroutessmitty route/etc/sysconfig/routes (SUSE) /etc/network/sysconfig/network-scripts (Redhat)
Network optionsno -asysctl -a
Error logserrpt and alogsyslog, evlog, tail /var/log/messages and dmesg
Start daemonsstartsrc -s (SRC Controlled)rc.svc_name start, chkconfig,
/etc/init.d/<svc_name>/start,
service <name> start
Stop daemonsstopsrc -s rc.svc_name stop, chkconfig,
/etc/init.d/<svc_name>/stop,
service <name> stop
Refresh daemonsrefresh -prc.svc_name restart,
/etc/init.d/<svc_name>/restart,
service <name> restart
Shutdown haltshutdown -hshutdown -h
Fast rebootshutdown -Frshutdown -r now
System dumpsysdumpdev -lN/A
Kernel tuningvmo (virtual memory)
schedo (scheduler)
no (network)
sysctl
Change kernelChange link in /usr/lib/boot/unix_*Change in /etc/yaboot.conf
Boot imagebosbootlilo (SUSE)
Change bootlistbootlistN/A
System boot messagesalogdmesg
Hope these prove useful to you as much as they do to me.

No comments: