AIX to Linux quick notes



Common System Files

File AIX Linux
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 files ODM 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/*.*
User limit /etc/security/limits /etc/security/limits.conf

Specific Commands
Action AIX Linux
Listing physical volumes (PV) lspv pvdisplay
List partitions in a disk lspv -l <disk> fdisk -l <disk>
List volume groups (VG) lsvg vgdisplay
Create volume group mkvg vgcreate
Remove volume group rmvg vgremove
Add a PV to VG extendvg vgextend
Remove a VG definition exportvg vgexport
Remove a PV from VG reducevg vgreduce
Import VG importvg vgimport
Activate VG varyonvg vgchange
List logical volume (LV) lslv lvdisplay
Create LV mklv lvcreate
Grow filesystems with LV chfs resize_reiserfs and resize2fs
Shrink filesystem chfs resize_reiserfs and resize2fs
Paging/Swap lsps -a procinfo
cat /proc/swaps
OS level oslevel
uname -a
cat /etc/SuSE-release
cat /etc/redhat-release
Run level who -r runlevel
Uptime uptime uptime
Performance vmstat, ps, sar, topas, and nmon vmstat, ps, sar, top,  and nmon (if installed)
List installed filesets lslpp -l  rpm -qa
Which fileset a file is in which_fileset <name> rpm -qf <path/name>
Verify installed filesets lppchk -v rpm -V <package>
List files in a fileset/package lslpp -f <fileset> rpm -ql <package>
List running kernel modules genkex lsmod
Insert module N/A (dynamic) insmod and modprobe
Unload modules N/A (dynamic) rmmod and modprobe
List memory installed bootinfo -r free, procinfo, and cat /proc/meminfo
Create users mksuer useradd
Change user details  chuser usermod and chage
Delete users rmuser userdel
Create groups mkgrp groupadd
Change group details chgrp groupmod
Delete group rmgrp groupdel
Install software installp, smitty install, rpm, and geninstall rpm -iv, yast -i, yast2 and yum install
Update software smitty update_all, installp, and rpm rpm -Uv, yast2 and yum
Remove software smit install, and rpm rpm -e, yast2 and yum
IP configuration smitty tcpip yast2 network (SUSE) /etc/network/sysconfig/network-scripts (Redhat)
IP alias ifconfig en# alias <IP> ifconfig eth#:1<IP>
Network interfaces netstat -in ifconfig 
Network routes netstat -rn netstat -rn, route
staticroutes smitty route /etc/sysconfig/routes (SUSE) /etc/network/sysconfig/network-scripts (Redhat)
Network options no -a sysctl -a
Error logs errpt and alog syslog, evlog, tail /var/log/messages and dmesg
Start daemons startsrc -s (SRC Controlled) rc.svc_name start, chkconfig,
/etc/init.d/<svc_name>/start,
service <name> start
Stop daemons stopsrc -s  rc.svc_name stop, chkconfig,
/etc/init.d/<svc_name>/stop,
service <name> stop
Refresh daemons refresh -p rc.svc_name restart,
/etc/init.d/<svc_name>/restart,
service <name> restart
Shutdown halt shutdown -h shutdown -h
Fast reboot shutdown -Fr shutdown -r now
System dump sysdumpdev -l N/A
Kernel tuning vmo (virtual memory)
schedo (scheduler)
no (network)
sysctl
Change kernel Change link in /usr/lib/boot/unix_* Change in /etc/yaboot.conf
Boot image bosboot lilo (SUSE)
Change bootlist bootlist N/A
System boot messages alog dmesg



Viết nhận xét

Các bạn có thể viết lời nhận xét cho bài viết, nhưng cần tuân thủ một số quy tắc sau:

» Các nhận xét/bình luận phải nghiêm túc, không dung tục, không spam.
» Nội dung phải liên quan tới chủ đề bài viết.
» Viết bằng tiếng việt có dấu hoặc tiếng Anh. Nội dung viết không dấu sẽ bị xóa.
» Hãy để lại tên của bạn khi nhận xét/bình luận, để tôi có thể dễ dàng trả lời bạn khi cần.